-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
300 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
149 changes: 149 additions & 0 deletions
149
en/docs/catalogs/config-generator-catalogs/artifact-deployer-api.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
--- | ||
openapi: 3.0.1 | ||
info: | ||
title: WSO2 API Platform for Kubernetes - Deploy K8s Resource API | ||
description: | | ||
This API is used to generate K8s resources for an API. | ||
version: 1.2.0 | ||
servers: | ||
- url: https://api.am.wso2.com/apk/1.2.0 | ||
paths: | ||
/apis/deploy: | ||
post: | ||
tags: | ||
- APIs | ||
summary: Deploy API | ||
security: | ||
- OAuth2Security: | ||
- apk:api_create | ||
description: | | ||
operationId: deployAPI | ||
requestBody: | ||
content: | ||
multipart/form-data: | ||
schema: | ||
$ref: "#/components/schemas/deploy-api-body" | ||
responses: | ||
"201": | ||
description: | | ||
API deployed successfully | ||
headers: | ||
Location: | ||
description: | | ||
The URL of the newly created resource. | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
Content-Type: | ||
description: | | ||
The content type of the body. | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
content: | ||
application/yaml: | ||
schema: | ||
$ref: "./apk-conf-schema.yaml#/components/schemas/APKConf" | ||
"400": | ||
$ref: "./common-responses.yaml#/components/responses/BadRequest" | ||
|
||
"500": | ||
$ref: "./common-responses.yaml#/components/responses/InternalServerError" | ||
|
||
/apis/undeploy: | ||
post: | ||
tags: | ||
- APIs | ||
summary: Undeploy API | ||
security: | ||
- OAuth2Security: | ||
- apk:api_create | ||
description: | | ||
operationId: undeployAPI | ||
parameters: | ||
- name: apiId | ||
in: query | ||
description: | | ||
UUID of the K8s API Resource | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"202": | ||
description: | | ||
API undeployed successfully | ||
headers: | ||
Content-Type: | ||
description: | | ||
The content type of the body. | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
type: string | ||
example: "API undeployed successfully" | ||
"400": | ||
$ref: "./common-responses.yaml#/components/responses/BadRequest" | ||
"500": | ||
$ref: "./common-responses.yaml#/components/responses/InternalServerError" | ||
components: | ||
schemas: | ||
deploy-api-body: | ||
properties: | ||
apkConfiguration: | ||
type: string | ||
description: apk-configuration file | ||
format: binary | ||
example: "api.apk-conf" | ||
definitionFile: | ||
type: string | ||
description: api definition (OAS/Graphql/WebSocket) | ||
format: binary | ||
example: "openapi.yaml" | ||
|
||
parameters: | ||
apiId: | ||
name: apiId | ||
in: path | ||
description: | | ||
**API ID** consisting of the **Name** of the API. | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
organizationId: | ||
name: X-WSO2-Organization | ||
in: header | ||
description: | | ||
**Organization ID** of the organization the API belongs to. | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
Accept: | ||
name: Accept | ||
in: header | ||
description: | | ||
Media types acceptable for the response. Default is application/json. | ||
required: false | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
default: application/json | ||
securitySchemes: | ||
OAuth2Security: | ||
type: oauth2 | ||
flows: | ||
password: | ||
tokenUrl: https://localhost:9095/oauth2/token | ||
scopes: | ||
openid: Authorize access to user details | ||
apk:api_create: Deploy and Undeploy APIs |
147 changes: 147 additions & 0 deletions
147
en/docs/catalogs/config-generator-catalogs/artifact-generator-api.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
--- | ||
openapi: 3.0.1 | ||
info: | ||
title: WSO2 API Platform for Kubernetes - Configuration generator API | ||
description: | | ||
This document specifies a **RESTful API** for WSO2 **APK** - **Runtime Component**. | ||
version: 1.2.0 | ||
servers: | ||
- url: https://api.am.wso2.com/apk/1.2.0 | ||
paths: | ||
/apis/generate-configuration: | ||
post: | ||
tags: | ||
- APIs | ||
summary: Create API configuration file from api specification. | ||
description: | | ||
operationId: generateConfiguration | ||
requestBody: | ||
content: | ||
multipart/form-data: | ||
schema: | ||
$ref: "#/components/schemas/definition-body" | ||
responses: | ||
"200": | ||
description: | | ||
Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. | ||
headers: | ||
Content-Type: | ||
description: | | ||
The content type of the body. | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
content: | ||
application/yaml: | ||
schema: | ||
$ref: "./apk-conf-schema.yaml#/components/schemas/APKConf" | ||
"400": | ||
$ref: "./common-responses.yaml#/components/responses/BadRequest" | ||
|
||
"500": | ||
$ref: "./common-responses.yaml#/components/responses/InternalServerError" | ||
/apis/generate-k8s-resources: | ||
post: | ||
tags: | ||
- APIs | ||
summary: Generate K8s Resources | ||
description: | | ||
operationId: generateK8sResources | ||
parameters: | ||
- $ref: "#/components/parameters/organizationId" | ||
requestBody: | ||
content: | ||
multipart/form-data: | ||
schema: | ||
$ref: "#/components/schemas/generate-k8s-resources-body" | ||
responses: | ||
"200": | ||
description: | | ||
headers: | ||
Content-Type: | ||
description: | | ||
The content type of the body. | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
content: | ||
application/zip: | ||
schema: | ||
type: string | ||
format: binary | ||
example: "api.zip" | ||
"400": | ||
$ref: "./common-responses.yaml#/components/responses/BadRequest" | ||
|
||
"500": | ||
$ref: "./common-responses.yaml#/components/responses/InternalServerError" | ||
components: | ||
schemas: | ||
generate-k8s-resources-body: | ||
properties: | ||
apkConfiguration: | ||
type: string | ||
description: apk-configuration file | ||
format: binary | ||
example: "api.apk-conf" | ||
definitionFile: | ||
type: string | ||
description: api definition (OAS/Graphql/WebSocket) | ||
format: binary | ||
example: "openapi.yaml" | ||
apiType: | ||
type: string | ||
description: Type of API | ||
example: REST | ||
|
||
definition-body: | ||
properties: | ||
definition: | ||
type: string | ||
description: api definition (OAS/Graphql/WebSocket) | ||
format: binary | ||
example: "openapi.yaml" | ||
url: | ||
type: string | ||
description: url of api definition | ||
example: "https://petstore3.swagger.io/api/v3/openapi.json" | ||
apiType: | ||
type: string | ||
description: Type of API | ||
example: REST | ||
parameters: | ||
apiId: | ||
name: apiId | ||
in: path | ||
description: | | ||
**API ID** consisting of the **Name** of the API. | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
organizationId: | ||
name: organization | ||
in: query | ||
description: | | ||
**Organization ID** of the organization the API belongs to. | ||
required: false | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
Accept: | ||
name: Accept | ||
in: header | ||
description: | | ||
Media types acceptable for the response. Default is application/json. | ||
required: false | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
default: application/json |