Closed AlanMasciangelo closed 4 months ago
Hi @AlanMasciangelo , it's not support directly, but you could do something like this with an OASFilter
:
class SchemaDereferenceFilter implements OASFilter {
public Schema filterSchema(Schema schema) {
if (schema.getRef() == null) {
return schema;
}
String remoteSchema = null; // fetch the schema from the value in schema.getRef()
// the schema must be JSON
return OpenApiParser.parseSchema(remoteSchema);
}
}
@AlanMasciangelo did you give this a try and does it seem workable for you?
@MikeEdgar I haven't had a chance to test yet but yes this looks like it will work fine.
Does this project support dereferencing remote or uri
$ref
s? For example, I want to define my schema via a JSON schema definition and have that dereferenced into the final openapi output.