Note: Have read 2 questions on usage and still not clear, hence this question. Request some help on usecases.
our application is based on Typescript, the API is hand-written in swagger hub. Looking for tools/api that would ensure the contract and implementation are aligned. Wanted to know, how this project can help in that regard. I tried a sample
import {SchemaObject} from "openapi3-ts";
export class TestSchema implements SchemaObject {
title = "test ";
type = "object";
properties = {
"test": {
type: "string"
}
};
}
Questions:
Am I doing it right here? I can build up on defining entire spec.
I understand that I can use this to validate, can I use this to generate the document that can be rendered using other openapi tools?
Yes. You can build a complete spec using this library with support for Typescript. And the expose or serialize the final doc to JSON or YAML (in v.2). Best guidance here is to take a look to how specs are build on the tests.
Exactly. Once you render the contract, you can use it for all purposes.
Note: Have read 2 questions on usage and still not clear, hence this question. Request some help on usecases.
our application is based on Typescript, the API is hand-written in swagger hub. Looking for tools/api that would ensure the contract and implementation are aligned. Wanted to know, how this project can help in that regard. I tried a sample
Questions: