Nexmo / oas_parser

An open source Open API Spec 3 Definition Parser
MIT License
51 stars 16 forks source link

recurrent references not allowed #24

Closed MarioRuiz closed 5 years ago

MarioRuiz commented 5 years ago

Using this open api 3 file: https://v2.namsor.com/NamSorAPIv2/api2/openapi.json When recurrent references for example:

"components": {
    "schemas": {
       "UserInfoOut": {
            "type": "object",
            "properties": {
                "otherInfos": {
                    "type": "array",
                    "items": {
                        "$ref": "#/components/schemas/UserInfoOut"
                    }
                }
mheap commented 5 years ago

Hey @MarioRuiz - how would you expect this to be handled? This would cause infinite recursion at the moment

MarioRuiz commented 5 years ago

@mheap maybe for those parsings that are not possible to be done, we should notify them and not parsing them but the rest

mheap commented 5 years ago

Sounds good. This isn't something we encounter but I'd be happy to receive a PR + tests