Principled code generation from OpenAPI specifications. https://guardrail.dev/
blast-hardcheese on master
Update swagger-parser to 2.1.2 Merge pull request #1559 from s… (compare)
blast-hardcheese on master
Update scalafmt-core to 3.5.9 Merge pull request #1557 from s… (compare)
TraceBuilder
is really a relic, considering the new request/response transformers. I was initially against having those, as they permit complete violation of the spec or schema, but after wrestling with TraceBuilder for so long, I was really brought around to the more pragmatic, general solution.
guardrail-contrib
library dependency that fits that function signature to add a bit more structure, in a modular way
TraceBuilder
stuff was modeled around some abstractions we had in Twilio for integrating with Lightstep, datadog APM wasn't available to use at that time
The migration has already been merged, (0.64.4 was actually already accidentally released under dev.guardrail with the package changes), the only follow-up changes are to sbt-guardrail, guardrail-maven-plugin, and guardrail-gradle-plugin. If any of those strike your fancy, that would be tremendously helpful.
Once the new plugins under the new org are available, my plan is to cut a hotfix on the 0.64.x branch in the old org that includes a log line to advise consumers to switch over to the new org in order to continue getting updates via scala-steward or dependabot
sonatypeProfiles
in target/
, without any sort of eviction if you fix the problem.
organization
back to com.twilio
and publish the same version to both, to give an opportunity for scala-steward to prompt for upgrades to a version that also prints a warning about the organization change
guardrail-circe
, guardrail-http4s
, guardrail-dropwizard
, or otherwise? A problem I'm trying to solve is to stop the seeming runaway train that is attempted semver split across so many subprojects
guardrail-${language}-${library}
as well
<modules><module><name>http4s</name><clientClass>dev.guardrail.generators.ScalaGenerator.Http4sClientGenerator.ClientTermInterp</clientClass>...
where the fqcn's are able to be specified (with sensible defaults) in the pom.xml, and so long as the codegen phase has those dependencies on the classpath everything comes together
circe-java8
could be spun out without just hanging on in the core forever
+val myCustomHttp4sThing = modules.http4s.client.copy(
+ newGetExtraImports={ tracingEnabled =>
+ import scala.meta._
+ dev.guardrail.Target.pure(List(q"import dev.guardrail.example"))
+ }
+)
lazy val exampleClient = (project in file("example-client"))
.settings(commonSettings)
.settings(
- Compile / guardrailTasks += ScalaClient(file("server.yaml"), pkg="example.client", framework="http4s"),
+ Compile / guardrailTasks += ScalaClient(file("server.yaml"), pkg="example.client", framework="http4s").modules(myCustomHttp4sThing, _.circe.json),
libraryDependencies ++= commonDependencies
)