Skip to content

Problem With Schema in Open Api Export #7581

@SalvadorCardona

Description

@SalvadorCardona

Description
Hello, with my frontend application i generate my interface Typescrip from the openai.json.

Before the 4.2 update, I had my JsonLd properties in the Schema Open API.

The Schemas had an allOf key which will allow me to generate my Typescript interfaces

"Company.jsonld": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/HydraItemBaseSchema"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "createdBy": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "iri-reference",
                                "example": "https://example.com/"
                            },
                            "createdAt": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "iri-reference",
                                "example": "https://example.com/"
                            },
                            "customers": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "iri-reference",
                                    "example": "https://example.com/"
                                }
                            },

Now, the JSON LD Properties is added in the description of the response like

200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/ld+json": components["schemas"]["HydraCollectionBaseSchema"] & {
                        member: components["schemas"]["Company.jsonld"][];
                    };
                    "application/json": components["schemas"]["HydraCollectionBaseSchema"] & {
                        member: components["schemas"]["Company.jsonld"][];
                    };
                };
            };

and my Schema has not Json LD Properties.

It's a new behavior for Open Api Json Schema ?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions