biocad / openapi3

OpenAPI 3.0 data model
BSD 3-Clause "New" or "Revised" License
39 stars 54 forks source link

How to read in an OpenApi spec with external references? #53

Closed waalge closed 2 years ago

waalge commented 2 years ago

How can I parse an OpenApi document with external references?

My basic attempt doesn't work.

> Yaml.decodeFileThrow @IO @OpenApi "./openapi.yaml"
*** Exception: AesonException "Error in $.paths['/my/endpoint'].post.requestBody.content['application/json'].schema.items: expected $ref of the form \"#/components/schemas/*\", but got \"base.yaml#/components/schemas/MyForm\""