Open eharvey71 opened 7 months ago
Actually, when I test with 3.04 or 3.03, I have a different issue with specs being invalid:
Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^\\/']['patternProperties']['^(get|put|post|delete|options|head|patch|trace)$']['properties']['requestBody']:
{'oneOf': [{'$ref': '#/definitions/RequestBody'},
{'$ref': '#/definitions/Reference'}]}
3.0.2 seems to be the most stable for my needs and works perfectly, but it would be great to run the latest and greatest.
3.1 has fixed my issue. Thank you!
@eharvey71 How are you splitting your files? I have a similar setup to the one in the beginning of this post and I still find errors when version is higher than 3.0.2 including 3.1... thanks!!!
I think I may have closed this prematurely, thought it was working, gave up, and went with the single flat file spec.
I WAS using this: https://github.com/eharvey71/video-platform-integration-bridge/blob/main/apispecs/swagger-refs-version.yml ... and it seemed to be working well until the underlying jsonschema issues arose once again. This is starting to get unworkable in the case of scaling out specs and I may have to look at something else. This was perfect but my app has to grow to support more abstractions.
I love Connexion, I'm even a sponsor, but so much for "spec first" ¯_(ツ)_/¯ .. it's not a priority: https://github.com/spec-first/connexion/issues/1897
https://github.com/spec-first/connexion/issues/1897 is not related to this issue. It is about a clearer error message, but since this error is developer-facing and not user-facing, I indeed do not consider it a priority. As mentioned, I would welcome a PR from someone who does think it is a priority.
Can you confirm that this issue is related to the /openapi.json
endpoint and the swagger UI? Those indeed break when splitting specs, however based on my testing, any paths defined in the spec work as expected.
I have my yml files divided into subdirectories for paths, parameters, schemas, etc. This worked fine (and still works fine) on Connexion
3.0.43.0.2. Connexion3.0.5 and 3.0.63.0.3 - 3.0.6 are still throwing errors. The prior fixes for $refs don't seem to have fixed issues. I thought this was just a Windows filesystem or jsonschema issue but it's happening all over - in my MacOS, Windows and docker container deployments running Debian.If I downgrade to Connexion
3.0.43.0.2 or prior, the error goes away, in all cases.I am working with a separate swagger UI deployment, so I can do customizations.
In my configuration, I'm initializing my app like this:
Paths are like this to specs, where my swagger.yml contains $refs to the proper paths of each of the divided spec files:
swagger.yml sample:
Full contents of error:
Output of the commands: