gOAst stands for generative Open API specification transformer, a tool designed to transform OpenAPI specifications into various forms with flexibility and extensibility at its core.
For more Information, please visit the gOAst GitHub Repository.
The @goast/typescript
package provides generators for TypeScript code generation
from OpenAPI specifications.
import { OpenApiGenerator } from '@goast/core';
import { TypeScriptFetchClientsGenerator, TypeScriptModelsGenerator } from '@goast/typescript';
async function main() {
await new OpenApiGenerator({ outputDir: '.api' })
.useType(TypeScriptModelsGenerator)
.useType(TypeScriptFetchClientsGenerator)
.parseAndGenerateFromDir('.openapi');
}
main();
TypeScriptModelsGenerator
: Generates TypeScript interfaces or types from schemas in the OpenAPI specification(s).TypeScriptFetchClientsGenerator
: Generates Fetch clients for TypeScript from paths in the OpenAPI specification(s).- Depends on the output of the
TypeScriptModelsGenerator
generator.
- Depends on the output of the
TypeScriptAngularServicesGenerator
: Generates Angular services from paths in the OpenAPI specification(s).- Depends on the output of the
TypeScriptModelsGenerator
generator.
- Depends on the output of the
TypeScriptEasyNetworkStubsGenerator
: Generates easy-network-stub classes from paths in the OpenAPI specification(s).- Depends on the output of the
TypeScriptModelsGenerator
generator.
- Depends on the output of the
TypeScriptK6ClientsGenerator
: Generates k6 clients from paths in the OpenAPI specification(s).- Depends on the output of the
TypeScriptModelsGenerator
generator.
- Depends on the output of the
The API documentation can be found here.