Skip to content

Commit

Permalink
OpenAPI first example
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiollende committed Mar 21, 2024
1 parent 9258bc4 commit d93a981
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions gatewayservice/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
openapi: 3.0.0
info:
title: Gateway Service API
version: 0.0.1
description: Gateway Service

servers:
- url: http://localhost:8080
description: Local server

paths:
/adduser:
post:
summary: Add a new user
operationId: addUser
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'200':
description: User added successfully
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: User ID
password:
type: string
example: Password
'400':
description: Invalid input
'409':
description: User already exists

0 comments on commit d93a981

Please sign in to comment.