Last active
February 2, 2018 12:57
-
-
Save oleg-koval/865aaaa44ba759c4d0188a67fb8212ca to your computer and use it in GitHub Desktop.
Some Private Resource Service API Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
version: x.y.z | |
title: Some Private Resource Service API | |
host: some-service.domain | |
basePath: / | |
schemes: | |
- http | |
- https | |
consumes: | |
- application/json | |
produces: | |
- application/json | |
paths: | |
/resourses/status/{resourceId}: | |
post: | |
summary: Change a status of a resource for users | |
parameters: | |
- name: resourceId | |
in: path | |
description: The id of the resource | |
type: string | |
required: true | |
- name: users | |
description: Array of userIds | |
in: body | |
required: true | |
schema: | |
type: array | |
items: | |
type: string | |
responses: | |
201: | |
description: Statuses successfuly changed | |
400: | |
description: Validation error | |
definitions: | |
User: | |
properties: | |
id: | |
type: string | |
description: User ID | |
ApiError: | |
properties: | |
message: | |
type: string | |
description: Text error message | |
code: | |
type: integer | |
description: Numeric error code | |
payload: | |
type: object | |
description: Error payload. No schema |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment