Skip to content

david-plugge-reproductions/elysia-swagger-response-schema-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elysia swagger malformed response schema

Posts schema:

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "title": {
                "type": "string"
            }
        },
        "required": ["title"]
    }
}

Generated Posts response schema:

{
    "responses": {
        "200": {
            "items": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string"
                    }
                },
                "required": ["title"]
            },
            "content": {
                "application/json": {
                    "schema": {
                        "type": "array"
                    }
                }
            }
        }
    }
}

The expected schema is:

{
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "title": {
                                    "type": "string"
                                }
                            },
                            "required": ["title"]
                        }
                    }
                }
            }
        }
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published