OAS Creator
The OAS Creator tool generates OpenAPI specification from backend database and enables the code-first approach.
This tool generates OpenAPI specifications with CRUD operations based on table schemas from API Agent sources tables. It can also generate OpenAPI specifications using a schema file in XML format.
- Key highlights
-
- This tool calls API Agent sources services to get API Agent sources configured table and schema details.
- The Code Generator tool generates an API service code using the generated OpenAPI specification as an input.
The following operations are supported in the OAS Creator tool:
- Generate OpenAPI specification for API Agent sources configured table
- Generate an OpenAPI specification from schema file
Generate OpenAPI specification for API Agent sources table
The Generate OpenAPI operation creates a OpenAPI specification with CRUD operations for requested table.
This operation displays an OpenAPI YAML file as downloadable.
Parameter | Required | Description |
---|---|---|
Table_name |
Yes | Name of the table for which OpenAPI spec has to be created. |
schema_name
|
Yes | Name of the table's schema for which OpenAPI spec has to be created. |
object_name |
Yes | Name of the object which is "schema_name"+_+"table_name" |
source_id |
Yes | Unique id for API Agent sources configured source. |
- Example prompts
-
-
Generate an openapi for a customers table with the schema name purchase_order
-
Create an openapi for a customers table with the schema name purchase_order
-
- Suggested next action
-
Enter the following prompt:
Generate some Python FastAPI server code based on the following openapi @customers_openapi.yaml
Generate an OpenAPI specification from a schema file
The Generate OpenAPI operation creates a OpenAPI specification with CRUD operations for uploaded table schema.
This operation displays an OpenAPI YAML file as downloadable.
Parameter | Required | Description |
---|---|---|
Table_name |
Uploaded schema file name as table name. | |
schema_file_name
|
Yes | Uploaded schema file name for which OpenAPI specification has to be created. |
- Example prompts
-
Generate an openapi spec from @schema.xml
- Suggested next action
-
Enter the following prompt:
Generate some Python FastAPI server code based on the following openapi @customers_openapi.yaml