-
I am auto-generating an openapi spec from my code, and I want to use this package to format the final document. Is there a way to import it and use the functions programatically, without having to resort to the CLI? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
hi @renke0 Yes, you can use a large part of the package functions in a NodeJS project. We are using them in the openapi-format-playground, which is a Typescript project. TypeScript Types: https://github.com/thim81/openapi-format-playground/blob/main/types/openapi-format.d.ts |
Beta Was this translation helpful? Give feedback.
hi @renke0
Yes, you can use a large part of the package functions in a NodeJS project.
We are using them in the openapi-format-playground, which is a Typescript project.
Example: https://github.com/thim81/openapi-format-playground/blob/main/src/pages/api/format.ts
TypeScript Types: https://github.com/thim81/openapi-format-playground/blob/main/types/openapi-format.d.ts