openapi: 3.0.1 info: title: API description: API using microservice architecture version: 1.0.0 servers: - url: http://localhost:8081/ security: - bearerAuth: [] paths: /user/login: post: tags: - User summary: Get token for the user. security: - NONE: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/User' required: false responses: "200": description: OK content: {} x-codegen-request-body-name: user /user/register: post: tags: - User summary: Add new user to system. security: - NONE: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/Register' required: false responses: "201": description: User created. content: {} "422": description: Unprocessable data. content: {} x-codegen-request-body-name: register /product/{id}: get: tags: - Product summary: Get product detail. parameters: - in: path name: id schema: type: integer required: true responses: "200": description: OK content: {} components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: User: required: - password - username type: object properties: username: type: string example: yourname@mail.com password: type: string example: P@ssw0rd Register: required: - password - username type: object properties: username: type: string example: yourname@mail.com password: type: string example: P@ssw0rd responses: UnauthorizedError: description: Authentication information is missing or invalid headers: WWW_Authenticate: schema: type: string content: {}