Skip to content

Commit

Permalink
feat: yaml options
Browse files Browse the repository at this point in the history
  • Loading branch information
urugator committed Aug 26, 2024
1 parent ce66fc7 commit 1e485ae
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/dsl/openapi-builder31.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,19 @@ export class OpenApiBuilder {
): string {
return JSON.stringify(this.rootDoc, replacer, space);
}
getSpecAsYaml(): string {
return yaml.stringify(this.rootDoc);
getSpecAsYaml(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
replacer?: any[] | ((key: any, value: any) => unknown) | null,
options?:
| string
| number
| (yaml.DocumentOptions &
yaml.SchemaOptions &
yaml.ParseOptions &
yaml.CreateNodeOptions &
yaml.ToStringOptions)
): string {
return yaml.stringify(this.rootDoc, replacer, options);
}

private static isValidOpenApiVersion(v: string): boolean {
Expand Down

0 comments on commit 1e485ae

Please sign in to comment.