Replies: 1 comment 1 reply
-
Hi @ptrdom glad to see you here. Before I answer, let's describe some things to make sure we're talking about the same stuff:
So right now, smithy4s generate scala code, but also open api spec, via: alloy-openapi. This package is build on top on smithy-openapi and so it's highly customizable. So what you want to do is not directly supported by any of these but it can be implemented. If you have, on the class path, an implementation of So if I were to do something like you want, I'd probably to the following:
|
Beta Was this translation helpful? Give feedback.
-
There are multiple different string formats supported by OpenAPI - https://swagger.io/docs/specification/data-models/data-types/#format, I wonder - is there a way to specify in smithy4s what
format
value should be set for a string attribute in OpenAPI schema? If not, would adding an annotation for it be beneficial?The use case I am thinking of is using type refinements to add
java.time.LocalDate
refinement for a string type, and haveformat
for that string attribute set todate
in generated OpenAPI schema.Beta Was this translation helpful? Give feedback.
All reactions