diff --git a/test/operation_ids_filter/input.yaml b/test/operation_ids_filter/input.yaml new file mode 100644 index 0000000..5a84f34 --- /dev/null +++ b/test/operation_ids_filter/input.yaml @@ -0,0 +1,107 @@ +swagger: '2.0' +schemes: + - http +host: xkcd.com +basePath: / +info: + description: 'Webcomic of romance, sarcasm, math, and language.' + title: XKCD + version: 1.0.0 + x-apisguru-categories: + - media + x-logo: + url: 'http://imgs.xkcd.com/static/terrible_small_logo.png' + x-visibility: private + x-origin: + - format: swagger + url: >- + https://raw.githubusercontent.com/APIs-guru/unofficial_openapi_specs/master/xkcd.com/1.0.0/swagger.yaml + version: '2.0' + x-providerName: xkcd.com + x-tags: + - humor + - comics + x-unofficialSpec: true +externalDocs: + url: 'https://xkcd.com/json.html' +securityDefinitions: {} +paths: + /info.0.json: + get: + operationId: get_current_comic + description: | + Fetch current comic and metadata. + parameters: + - $ref: '#/definitions/comic' + - $ref: '#/definitions/hovertext' + responses: + '200': + description: OK + schema: + $ref: '#/definitions/comic' + '/{comicId}/info.0.json': + get: + operationId: get_comics_by_id + description: | + Fetch comics and metadata by comic id. + responses: + '200': + description: OK + schema: + $ref: '#/definitions/comic' + post: + operationId: add_comic + description: | + add comic with title . + parameters: + - in: body + name: title + required: true + type: number + - $ref: '#/definitions/title' + responses: + '200': + description: OK + schema: + $ref: '#/definitions/comic' + parameters: + - in: path + name: comicId + required: true + type: number + - $ref: '#/definitions/hovertext' +definitions: + comic: + properties: + alt: + type: string + day: + type: string + img: + type: string + link: + type: string + month: + type: string + news: + type: string + num: + type: number + safe_title: + type: string + title: + type: string + transcript: + type: string + year: + type: string + type: object + hovertext: + x-visibility: private + properties: + description: + type: string + title: + properties: + title: + type: string diff --git a/test/operation_ids_filter/options.yaml b/test/operation_ids_filter/options.yaml new file mode 100644 index 0000000..7ebd783 --- /dev/null +++ b/test/operation_ids_filter/options.yaml @@ -0,0 +1,7 @@ +inverse: true +valid: true +flags: + - operationId +flagValues: + - get_comics_by_id + - get_current_comic diff --git a/test/operation_ids_filter/output.yaml b/test/operation_ids_filter/output.yaml new file mode 100644 index 0000000..c7e604a --- /dev/null +++ b/test/operation_ids_filter/output.yaml @@ -0,0 +1,65 @@ +swagger: '2.0' +info: + title: XKCD + version: 1.0.0 +paths: + /info.0.json: + get: + operationId: get_current_comic + description: | + Fetch current comic and metadata. + parameters: + - $ref: '#/definitions/comic' + - $ref: '#/definitions/hovertext' + responses: + '200': + description: OK + schema: + $ref: '#/definitions/comic' + '/{comicId}/info.0.json': + get: + operationId: get_comics_by_id + description: | + Fetch comics and metadata by comic id. + responses: + '200': + description: OK + schema: + $ref: '#/definitions/comic' + parameters: + - in: path + name: comicId + required: true + type: number + - $ref: '#/definitions/hovertext' +definitions: + comic: + properties: + alt: + type: string + day: + type: string + img: + type: string + link: + type: string + month: + type: string + news: + type: string + num: + type: number + safe_title: + type: string + title: + type: string + transcript: + type: string + year: + type: string + type: object + hovertext: + x-visibility: private + properties: + description: + type: string