Skip to content

Instantly share code, notes, and snippets.

@rezamt
Created November 15, 2023 22:07
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 rezamt/d42013cd29a6d83c5ea6167734b5487b to your computer and use it in GitHub Desktop.
Save rezamt/d42013cd29a6d83c5ea6167734b5487b to your computer and use it in GitHub Desktop.
Application Factory
openapi: 3.0.3
info:
title: Microsoft Azure Application Onboarding Factory - OpenAPI 3.0
description: |-
Microsoft Azure Application Onboarding Factory Platfomr API
termsOfService: http://swagger.io/terms/
contact:
email: reza@inuit.io
version: 0.1.0
externalDocs:
description: Check the Application Onboarding Factory Project Design
url: http://swagger.io
servers:
- url: https://aof.swagger.io/aof/api/v1
tags:
- name: application
description: Everything about application onboarding
externalDocs:
description: Find out more on
url: http://swagger.io
paths:
/applications:
post:
tags:
- application
summary: Add a new application to Azure Platform
description: Add a new application to Azure Platform
operationId: addApplication
requestBody:
description: Create a new application in Azure Platform
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
required: true
responses:
'201':
description: Successful Created
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Validation Exception
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many requests
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- application_auth:
- write:application
get:
tags:
- application
summary: Get applications list
description: Returns list of applications
operationId: getApplications
parameters:
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Application'
'400':
description: Invalid application ID
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Application not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed | Invalid Input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many requests
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- api_key: [ ]
- application_auth:
- write:application
- read:application
/applications/{id}:
get:
tags:
- application
summary: Get application by ID
description: Returns a single application
operationId: getApplicationById
parameters:
- name: id
in: path
description: ID of application to return
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Invalid application ID
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Application not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed | Invalid Input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many requests
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- api_key: [ ]
- application_auth:
- read:application
put:
tags:
- application
summary: Update an existing application
description: Update an existing application by Id
operationId: updateApplication
parameters:
- name: id
in: path
description: Application id to update
required: true
schema:
type: string
requestBody:
description: Update an existent application property on Azure
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
required: true
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Invalid application ID
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Application not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Validation exception
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many requests
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- application_auth:
- write:applications
- read:applications
delete:
tags:
- application
summary: Delete an application by ID
description: delete an application from Azure
operationId: deleteApplication
parameters:
- name: id
in: path
description: Application id to delete
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Invalid application ID
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Application not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many requests
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- application_auth:
- write:application
- read:application
components:
schemas:
Application:
required:
- name
- description
type: object
properties:
id:
type: string
format: uid
example: '9AB05217-9B19-475F-8D09-2EF10EEBD49F'
description:
type: string
example: string
name:
type: string
example: string
tenancy:
type: string
example: SingleTenant
description: application status in the store
enum:
- SingleTenant
- Multitenant
- MultitenantPersonalAccount
- PeronalAccount
platform:
type: string
example: Web
description: application status in the store
enum:
- Web
- SPA
- PublicClientWeb
- PublicClientDesktop
redirect_url:
type: string
format: uri
example: myapp://auth
description: application redirecturl
status:
type: string
description: application status in the store
example: Enum
enum:
- Created
- Syncing
- Inprogress
- PendingApproval
- PendingSecurityReview
- Deleted
- ValidationError
- Failed
- Rejected
Error:
type: object
properties:
code:
type: integer
format: int32
type:
type: string
message:
type: string
xml:
name: '##default'
requestBodies:
Application:
description: Application object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
application/xml:
schema:
$ref: '#/components/schemas/Application'
securitySchemes:
application_auth:
type: oauth2
flows:
implicit:
authorizationUrl: https://idp.swagger.io/oauth/authorize
scopes:
write:application: modify applications in your account
read:application: read your applications
admin:application: manage your applications
api_key:
type: apiKey
name: api_key
in: header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment