metadevpro / openapi3-ts

TS Model & utils for creating and exposing OpenAPI 3.x contracts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

init with existing API object

naivefun opened this issue · comments

can add a param to the builder constructor?

export class OpenApiBuilder {
    rootDoc: oa.OpenAPIObject;

    static create(doc?: oa.OpenAPIObject): OpenApiBuilder {
        return new OpenApiBuilder();
    }

    constructor(doc?: oa.OpenAPIObject) {
        this.rootDoc = doc || {
        ......

Good idea @naivefun ! Added and published on v. 1.0.2