Skip to content

Invalid examples & schemas for XML and JSON generated in API docs #4308

@wanderzell

Description

@wanderzell

We are struggling figuring out proper way how to fully support multiple media types (json, json-ld, xml) while having proper documentation and schemas in the API documentation.

At the beginning, it seemed the issue is specific to our software or set up. Then we looked at official demo or API Platform and saw all the same errors.

For example in https://demo.api-platform.com/docs

Books resource

Seems like the plain JSON example and schema does not exist and JSON LD version is used instead. However, that's not correct since plain JSON response only returns subset of fields of what's shown in the example:

json

Reviews resource

Looks like XML example is generated from JSON LD and thus contains invalid tags.

xml

Please advise what would be appropriate workaround, or how was this intended to work originally?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions