Open maxlepikhin opened 4 months ago
setResolve(true) tells OpenAPIV3Parser to load specs from external locations and put them in the model.
ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); OpenAPI openApiModel = new OpenAPIV3Parser().read(inputFile, null, parseOptions);
It is desirable to distinguish schemas loaded from external locations from the ones defined locally. For example:
On the other hand, api3.yaml may reference another file.yaml that must be resolved and included in the generated code for api3 unlike errors.yaml.
Proposal: store original reference in $originalRef next to $ref in SchemaProcessor.
This change will let code generators add custom logic for shared vs not schemas.
setResolve(true) tells OpenAPIV3Parser to load specs from external locations and put them in the model.
It is desirable to distinguish schemas loaded from external locations from the ones defined locally. For example:
On the other hand, api3.yaml may reference another file.yaml that must be resolved and included in the generated code for api3 unlike errors.yaml.
Proposal: store original reference in $originalRef next to $ref in SchemaProcessor.
This change will let code generators add custom logic for shared vs not schemas.