Skip to content

Commit

Permalink
feat(resolver): add support for modelPropertyMacro option
Browse files Browse the repository at this point in the history
This change is specific to OpenAPI 3.1.0 strategy.

Refs #2749
  • Loading branch information
char0n committed Jan 18, 2023
1 parent 51b1134 commit fb935c7
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ const OpenApi3_1SwaggerClientDereferenceStrategy = OpenApi3_1DereferenceStrategy
useCircularStructures: true,
allowMetaPatches: false,
parameterMacro: null,
modelPropertyMacro: null,
},
init({
useCircularStructures = this.useCircularStructures,
allowMetaPatches = this.allowMetaPatches,
parameterMacro = this.parameterMacro,
modelPropertyMacro = this.modelPropertyMacro,
} = {}) {
this.name = 'openapi-3-1-swagger-client';
this.useCircularStructures = useCircularStructures;
this.allowMetaPatches = allowMetaPatches;
this.parameterMacro = parameterMacro;
this.modelPropertyMacro = modelPropertyMacro;
},
methods: {
async dereference(file, options) {
Expand All @@ -45,6 +48,7 @@ const OpenApi3_1SwaggerClientDereferenceStrategy = OpenApi3_1DereferenceStrategy
useCircularStructures: this.useCircularStructures,
allowMetaPatches: this.allowMetaPatches,
parameterMacro: this.parameterMacro,
modelPropertyMacro: this.modelPropertyMacro,
});
const dereferencedElement = await visitAsync(refSet.rootRef.value, visitor, {
keyMap,
Expand Down
Loading

0 comments on commit fb935c7

Please sign in to comment.