Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions test/operation_ids_filter/input.yaml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions test/operation_ids_filter/options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
inverse: true
valid: true
flags:
- operationId
flagValues:
- get_comics_by_id
- get_current_comic
65 changes: 65 additions & 0 deletions test/operation_ids_filter/output.yaml
Original file line number Diff line number Diff line change
@@ -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