Skip to content

Commit

Permalink
Update API catalog for 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sgayangi committed Oct 30, 2024
1 parent c772375 commit d470c75
Show file tree
Hide file tree
Showing 4 changed files with 300 additions and 4 deletions.
4 changes: 2 additions & 2 deletions en/docs/catalogs/api-reference-config-deployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
template: templates/redoc.html
---

<redoc spec-url='https://raw.githubusercontent.com/wso2/apk/main/runtime/config-deployer-service/ballerina/resources/artifact-deployer-api.yaml'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
<redoc spec-url='https://raw.githubusercontent.com/wso2/docs-apk/refs/heads/1.2.0/en/docs/catalogs/config-generator-catalogs/artifact-deployer-api.yaml'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
4 changes: 2 additions & 2 deletions en/docs/catalogs/api-reference-config-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
template: templates/redoc.html
---

<redoc spec-url='https://raw.githubusercontent.com/wso2/apk/main/runtime/config-deployer-service/ballerina/resources/artifact-generator-api.yaml'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
<redoc spec-url='https://raw.githubusercontent.com/wso2/docs-apk/refs/heads/1.2.0/en/docs/catalogs/config-generator-catalogs/artifact-generator-api.yaml'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
149 changes: 149 additions & 0 deletions en/docs/catalogs/config-generator-catalogs/artifact-deployer-api.yaml
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 en/docs/catalogs/config-generator-catalogs/artifact-generator-api.yaml
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

0 comments on commit d470c75

Please sign in to comment.