Skip to content

Instantly share code, notes, and snippets.

@muralidharan-rade
Created May 2, 2023 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muralidharan-rade/95280844491ba2a013a8ce4bfb9178e3 to your computer and use it in GitHub Desktop.
Save muralidharan-rade/95280844491ba2a013a8ce4bfb9178e3 to your computer and use it in GitHub Desktop.
openapi: 3.0.1
info:
title: OpenAPI definition
version: v0
servers:
- url: http://localhost:8080
description: Generated server url
paths:
/api/attachments/upload:
put:
tags:
- attachment-resource
operationId: upload
parameters:
- name: ticketNumber
in: query
required: true
schema:
type: string
- name: count
in: query
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
required:
- file
type: object
properties:
file:
type: string
format: binary
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentInfo'
/api/user/update:
post:
tags:
- user-resource
operationId: updateUser
parameters:
- name: token
in: header
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
/api/user/create:
post:
tags:
- user-resource
operationId: createUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
/api/ticket/create:
post:
tags:
- service-ticket-resource
operationId: createTicket
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTicket'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTicket'
/api/otp/validate:
post:
tags:
- otp-login-resource
operationId: validate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthRequestDTO'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AuthResponseDTO'
/api/otp/generate:
post:
tags:
- otp-login-resource
operationId: generate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthRequestDTO'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AuthResponseDTO'
/api/ticket/update:
patch:
tags:
- service-ticket-resource
operationId: updateTicket
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTicket'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTicket'
/api/user/:
get:
tags:
- user-resource
operationId: getUser
parameters:
- name: user
in: query
required: true
schema:
$ref: '#/components/schemas/User'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
/api/ticket/{id}:
get:
tags:
- service-ticket-resource
operationId: getTicket
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTicket'
/api/ticket/requestor:
get:
tags:
- service-ticket-resource
operationId: getTicketByRequestorEmail
parameters:
- name: email
in: query
required: false
schema:
type: string
- name: id
in: query
required: false
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTicket'
/api/attachments/download:
get:
tags:
- attachment-resource
operationId: downloadObject
parameters:
- name: location
in: query
required: true
schema:
type: string
responses:
"200":
description: OK
content:
'*/*':
schema:
type: string
format: binary
components:
schemas:
AttachmentInfo:
type: object
properties:
name:
type: string
uploadedBy:
$ref: '#/components/schemas/User'
createdTime:
type: string
format: date-time
location:
type: string
User:
type: object
properties:
id:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
phoneNumber:
type: string
loginId:
type: string
type:
type: string
Comment:
type: object
properties:
commentorId:
type: string
timestamp:
type: string
format: date-time
description:
type: string
ServiceTicket:
type: object
properties:
id:
type: string
title:
type: string
description:
type: string
comments:
type: array
items:
$ref: '#/components/schemas/Comment'
attachments:
type: array
items:
$ref: '#/components/schemas/AttachmentInfo'
requestor:
$ref: '#/components/schemas/UserInfo'
assignee:
$ref: '#/components/schemas/UserInfo'
consultant:
$ref: '#/components/schemas/UserInfo'
UserInfo:
type: object
properties:
id:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
phoneNumber:
type: string
loginId:
type: string
type:
type: string
AuthRequestDTO:
type: object
properties:
phoneNumber:
type: string
userId:
type: string
code:
type: string
AuthResponseDTO:
type: object
properties:
phoneNumber:
type: string
user:
$ref: '#/components/schemas/User'
status:
type: string
sid:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment