Skip to content

Commit

Permalink
Merge pull request #1950 from zhulongcheng/doc-macro
Browse files Browse the repository at this point in the history
docs(http): put macros/:id endpoint
  • Loading branch information
goller authored Dec 17, 2018
2 parents 09626a4 + a1f3ca5 commit d0263a4
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ workflows:
only:
- master
jobs:
- gotest
- jstest
- deploy:
requires:
- gotest
- jstest
filters:
branches:
only: master
only: master
71 changes: 49 additions & 22 deletions http/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ paths:
get:
tags:
- Macros
summary: keywords that specify how input data gets mapped to a replacement output sequence
summary: get all macros
parameters:
- in: query
name: org
Expand Down Expand Up @@ -501,23 +501,23 @@ paths:
schema:
$ref: "#/components/schemas/Error"
post:
summary: keywords that specify how input data gets mapped to a replacement output sequence
summary: create a macro
tags:
- Macros
parameters:
- in: query
name: org
required: true
schema:
type: string
description: filter macros to a specific organization name
requestBody:
description: macro to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Macro"
responses:
'201':
description: macro created
content:
application/json:
schema:
$ref: "#/components/schemas/Macros"
$ref: "#/components/schemas/Macro"
default:
description: internal server error
content:
Expand All @@ -528,20 +528,14 @@ paths:
delete:
tags:
- Macros
summary: keywords that specify how input data gets mapped to a replacement output sequence
summary: delete a macro
parameters:
- in: path
name: macroID
required: true
schema:
type: string
description: id of the macro
- in: query
name: org
required: true
schema:
type: string
description: filter macros to a specific organization name
responses:
'204':
description: macro deleted
Expand All @@ -552,7 +546,7 @@ paths:
schema:
$ref: "#/components/schemas/Error"
patch:
summary: keywords that specify how input data gets mapped to a replacement output sequence
summary: update a macro
tags:
- Macros
parameters:
Expand All @@ -562,19 +556,51 @@ paths:
schema:
type: string
description: id of the macro
- in: query
name: org
requestBody:
description: macro update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Macro"
responses:
'200':
description: macro updated
content:
application/json:
schema:
$ref: "#/components/schemas/Macro"
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
put:
summary: replace a macro
tags:
- Macros
parameters:
- in: path
name: macroID
required: true
schema:
type: string
description: filter macros to a specific organization name
description: id of the macro
requestBody:
description: macro to replace
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Macro"
responses:
'200':
description: macro updated
content:
application/json:
schema:
$ref: "#/components/schemas/Macros"
$ref: "#/components/schemas/Macro"
default:
description: internal server error
content:
Expand Down Expand Up @@ -5191,6 +5217,7 @@ components:
properties:
links:
type: object
readOnly: true
properties:
self:
type: string
Expand Down

0 comments on commit d0263a4

Please sign in to comment.