Newer
Older
openapi: 3.0.3
info:
title: Airport Manager authorization microservice
description: Airport Manager authorization microservice
version: 1.0.0
servers:
- url: "{scheme}://{server}:{port}"
description: my server
variables:
scheme:
default: http
enum:
- http
- https
server:
default: localhost
port:
paths:
/api/users/{id}:
get:
tags:
- User
summary: Get user by id.
description: Returns an object representing an user.
operationId: getUserById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UserDto'
"404":
description: Not Found
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
put:
tags:
- User
summary: Update user by id.
description: Update a user
operationId: updateUserById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CreationUserDto'
"404":
description: Not Found
delete:
tags:
- User
summary: Delete user by id.
description: delete a user
operationId: deleteUserById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
"404":
description: Not Found
components:
schemas:
DomainEntity:
title: Domain Entity
description: Represents a Domain Entity
type: object
required:
- id
properties:
id:
type: integer
description: unique id
format: int64
example: 1
discriminator:
propertyName: objectType
UserDto:
allOf:
- $ref: '#/components/schemas/DomainEntity'
type: object
title: User
description: Represents a system user.
required:
- id
- firstName
- lastName
properties:
firstName:
type: string
description: first name of a the user
example: John
lastName:
type: string
description: last name of a user
example: Doe
CreationUserDto:
type: object
title: User
description: Represents a user.
properties:
firstName:
type: string
description: first name of a the user
example: John
required: true
lastName:
type: string
description: last name of a user
example: Doe
required: true