feature #11: describe "get citizen" in openAPI

This commit is contained in:
2019-08-29 13:30:08 +02:00
parent c057a4aad3
commit 11fae5f19c

View File

@@ -1,13 +1,9 @@
openapi: 3.0.0
openapi: 3.0.1
info:
version: '0.1'
title: 'DC Project'
description: 'A free comunity program for create constitution'
tags:
- name: article
description: Manage Articles
paths:
/register:
post:
@@ -42,7 +38,40 @@ paths:
example:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJBdXRoZW50aWNhdGlvbiIsImlzcyI6ImRjLXByb2plY3QuZnIiLCJpZCI6ImQ1NDRhNmE4LWJhYjgtNDU2MC05NWIxLThhZjAyMDNkOTEwNCIsImV4cCI6MTU2NzA3Mzc0Mn0.0VTetv8fZFjVgpJ-bwJpidGNHJUOmgj8vuZcZXzwnLa7TtFwcXWvh3bDPYHqB66nmOfXyM57XnHDbmRwtipCag
/citizens/{citizen}:
get:
security:
- JWTAuth: []
summary: Get Citizen
tags:
- citizen
operationId: getCitizen
parameters:
- name: citizen
in: path
description: ID of citizen
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
required: true
schema:
type: string
format: uuid
responses:
200:
description: The Citizen object
content:
application/json:
schema:
$ref: '#/components/schemas/CitizenResponse'
404:
description: Citizen not found
components:
securitySchemes:
JWTAuth:
type: http
scheme: bearer
description: call /login to get token
schemas:
UUID:
type: string
@@ -138,9 +167,6 @@ components:
application/json:
schema:
$ref: '#/components/schemas/RegisterRequest'
application/xml:
schema:
$ref: '#/components/schemas/RegisterRequest'
description: Register
required: true
@@ -149,9 +175,6 @@ components:
application/json:
schema:
$ref: '#/components/schemas/LoginRequest'
application/xml:
schema:
$ref: '#/components/schemas/LoginRequest'
description: Login
required: true