Skip to content

Commit

Permalink
Remove allowedDefaultRefs
Browse files Browse the repository at this point in the history
  • Loading branch information
AshotN authored Sep 30, 2023
1 parent 514a6cd commit ffdf6be
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ exports.idPathParameters = function idPathParameters (idName, idSeparator) {
return `{${Array.isArray(idName) ? idName.join(`}${idSeparator}{`) : idName}}`;
};

const allowedDefaultRefs = [
'findResponse',
'getResponse',
'createRequest',
'createResponse',
'createMultiRequest',
'createMultiResponse',
'updateRequest',
'updateResponse',
'updateMultiRequest',
'updateMultiResponse',
'patchRequest',
'patchResponse',
'patchMultiRequest',
'patchMultiResponse',
'removeResponse',
'removeMultiResponse',
'filterParameter',
'sortParameter',
'queryParameters'
];

exports.defaultTransformSchema = function defaultTransformSchema (schema) {
const allowedProperties = pick(schema, [
'title',
Expand Down Expand Up @@ -235,9 +213,7 @@ exports.createSwaggerServiceOptions = function createSwaggerServiceOptions ({ sc
const schemaName = schema.$id;
if (schemaName) {
serviceDocs.schemas[schemaName] = transformSchemaFn(schema);
if (allowedDefaultRefs.includes(key)) {
serviceDocs.refs[key] = schemaName;
}
serviceDocs.refs[key] = schemaName;
}
});

Expand Down

0 comments on commit ffdf6be

Please sign in to comment.