core
core copied to clipboard
Swagger UI / OpenAPI / JSON Schema : document type "iri" example
Description
An IRI is represented like this in JSON Schema:
"type": "string",
"format": "iri-reference"
But this triggers a bug (see https://github.com/api-platform/core/issues/5900).
Example
To mitigate this issue we need to try to render something like this:
"type": "string",
"format": "iri-reference",
"example": "/books/1"
If we can't generate an IRI we should default to example.com
Hello everyone.
I am trying to understand this issue. I just created a big data model and pulled up Swagger to look at the schema, and all properties that represent relationships to other entities are showing "https://example.com/" instead of data structure of that related entity or a reference to it.
Is this expected behavior? Is it desired? If not, what is the desired end state?
Lastly, is there some documentation that can help me understand what I'm supposed to do to eliminate these "https://example.com/" and instead provide more meaningful documentation in my project?
Thank you!
Hi, this is not a support channel les-tilleuls.coop provides paid support or trainings.