Open petrkasnal opened 1 year ago
OpenAPI.Net readers currently only have limited support for external files. External files need to be valid OpenAPI documents themselves. Also, $ref in pathItems is a special case that is not supported.
The best option is to preprocess your OpenAPI file using a reference resolver before handing it over to OpenAPI.Net.
Thank you for response. Do you think about add this functionality sometime?
Yes. We are aiming to fix external references in our v2 version.
Yes. We are aiming to fix external references in our v2 version.
Thank you for reply. And when do you think will be v3 ready? Thank you
Hello,
I have my OpenAPI specification in separate files. I use references to load data. When I try to do so, I get an exception.
{"Unable to cast object of type 'SharpYaml.Serialization.YamlScalarNode' to type 'SharpYaml.Serialization.YamlMappingNode'."}
My openapi looks `openapi: 3.0.3 info: title: 'Test' version: '1.0.0'
components: schemas: $ref: './AllSchemas.yml'
paths: /api/orders: $ref: './orders.yml'`
Can you please help me? Thank you