Schema specification for java.time #702
-
Hi! I'm migrating my OpenAPI specification from Swagger to MicroProfile. I have some Let's stick with On Swagger it was generated always inline, as: "schema": {
"type": "string",
"format": "date"
} And on MicroProfile it is generated as: "schema": {
"format": "date",
"type": "string",
"example": "2022-03-10"
} MicroProfile schemas are better handled as it shows examples, but it switch in generating schema inlined and referenced, like this: "schema": {
"$ref": "#/components/schemas/LocalDate"
} So, my questions are:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The specification doesn't define whether schemas should be placed inline in the document or referenced since they're semantically the same. That choice is left up to the implementation. I would ask this question to whichever MicroProfile implementation you're using. They should be able to say what strategy they use for creating schemas and may have a configuration option for it. |
Beta Was this translation helpful? Give feedback.
The specification doesn't define whether schemas should be placed inline in the document or referenced since they're semantically the same. That choice is left up to the implementation.
I would ask this question to whichever MicroProfile implementation you're using. They should be able to say what strategy they use for creating schemas and may have a configuration option for it.