@oaspect/core
v0.5.0
Published
Framework-free OpenAPI processing for documentation UIs: $ref resolution, examples, code samples, Markdown and syntax highlighting.
Maintainers
Readme
@oaspect/core
Framework-free OpenAPI processing behind oaspect:
loadSpecText(),parseSpec(),normalizeSpec(): JSON or YAML, Swagger 2.0 → OpenAPI 3.0buildModel(): tags → operations with resolved parameters, bodies and responsesresolveSchema(),childrenOf(),typeLabel():$ref/allOfresolution for schema treesexampleFromSchema(),mediaExample(): example valuesbuildRequest(),defaultValues(),defaultBody(): concrete HTTP requestsSNIPPET_LANGUAGES,resolveSnippet(): code samples for 30 clientsparseMarkdown(),selectLocale(),localize(): Markdown with:::langblocks andx-i18ntokenize(): syntax highlighting tokens
Written in TypeScript; ships ESM with type definitions. MIT licensed.
