core icon indicating copy to clipboard operation
core copied to clipboard

Swagger UI / OpenAPI / JSON Schema : document type "iri" example

Open soyuka opened this issue 1 year ago • 2 comments

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

soyuka avatar Dec 19 '23 18:12 soyuka

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!

grichards avatar Jan 12 '24 02:01 grichards

Hi, this is not a support channel les-tilleuls.coop provides paid support or trainings.

soyuka avatar Jan 12 '24 10:01 soyuka