diff --git a/en/docs/catalogs/api-reference-config-deployer.md b/en/docs/catalogs/api-reference-config-deployer.md index fc2b3eb69..72ba837e8 100644 --- a/en/docs/catalogs/api-reference-config-deployer.md +++ b/en/docs/catalogs/api-reference-config-deployer.md @@ -2,5 +2,5 @@ template: templates/redoc.html --- - - + + \ No newline at end of file diff --git a/en/docs/catalogs/api-reference-config-generator.md b/en/docs/catalogs/api-reference-config-generator.md index b8b690252..d2cdf1516 100644 --- a/en/docs/catalogs/api-reference-config-generator.md +++ b/en/docs/catalogs/api-reference-config-generator.md @@ -2,5 +2,5 @@ template: templates/redoc.html --- - - + + \ No newline at end of file diff --git a/en/docs/catalogs/config-generator-catalogs/artifact-deployer-api.yaml b/en/docs/catalogs/config-generator-catalogs/artifact-deployer-api.yaml new file mode 100644 index 000000000..be07b28b2 --- /dev/null +++ b/en/docs/catalogs/config-generator-catalogs/artifact-deployer-api.yaml @@ -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 diff --git a/en/docs/catalogs/config-generator-catalogs/artifact-generator-api.yaml b/en/docs/catalogs/config-generator-catalogs/artifact-generator-api.yaml new file mode 100644 index 000000000..56a86d7d4 --- /dev/null +++ b/en/docs/catalogs/config-generator-catalogs/artifact-generator-api.yaml @@ -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