opticdev / optic

OpenAPI linting, diffing and testing. Optic helps prevent breaking changes, publish accurate documentation and improve the design of your APIs.
https://useoptic.com
MIT License
1.35k stars 79 forks source link

Fix swagger2 basic schema to include an $id #2776

Closed niclim closed 6 months ago

niclim commented 6 months ago

🍗 Description

What does this PR do? Anything folks should know?

Not sure why the tests are passing on this, but when trying to run optic spec push against a swagger 2 file (triggers the basic swagger2 file schema) i get this error Error: schema with key or id "" already exists. Adding an id here fixes this

📚 References

Links to relevant docs (Notion, Twist, GH issues, etc.), if applicable.

👹 QA

How can other humans verify that this PR is correct?