Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
MaSch0212/goastA tool designed to transform OpenAPI specifications into various forms with flexibility and extensibility at its core.
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers



JSR Score
76%
Published
6 months ago (0.4.2)
gOAst (@goast/core)
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.
Purpose 👍
The @goast/core package provides:
- entry points for using the gOAst library
- base classes for creating custom generators
- utilities for parsing and transforming OpenAPI specifications
Usage Example 🚀
import { OpenApiGenerator } from '@goast/core'; class MyGenerator implements OpenApiGenerationProvider { generate( context: OpenApiGeneratorContext<OpenApiGeneratorInput>, config?: Partial<Readonly<Record<string, unknown>>>, ): Record<string, unknown> { // Do something return {}; } } async function main() { const generator = new OpenApiGenerator() // Add a generator using a class .useType(MyGenerator) // Add a generator using a function .useFn((ctx, cfg) => { // Do the generation return {}; // Return information about the generated files so it can be used by other generators }) // Add a generator using an object implementing `OpenApiGenerationProvider` .useValue({ generate: (ctx, cfg) => ({}) }); // Generate for one of more OpenAPI specification files await generator.parseAndGenerate('path/to/openapi.json', 'path/to/another/openapi.yaml'); // Alternatively, you can generate output for all specifications in a directory. // By default, it will only consider files within the directory (non-recursively) with the extensions: .json, .yaml, .yml. await generator.parseAndGenerateFromDir('path/to/openapi/specs'); } main();
Available Generator Packages 📚
API Documentation 📖
The API documentation can be found here.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@goast/core
Import symbol
import * as core from "@goast/core";
Import directly with a jsr specifier
import * as core from "jsr:@goast/core";
Add Package
pnpm i jsr:@goast/core
pnpm dlx jsr add @goast/core
Import symbol
import * as core from "@goast/core";
Add Package
yarn add jsr:@goast/core
yarn dlx jsr add @goast/core
Import symbol
import * as core from "@goast/core";
Add Package
vlt install jsr:@goast/core
Import symbol
import * as core from "@goast/core";
Add Package
npx jsr add @goast/core
Import symbol
import * as core from "@goast/core";
Add Package
bunx jsr add @goast/core
Import symbol
import * as core from "@goast/core";