UNPKG

@protocolnebula/ts-openapi-generator

Version:

Build API and models from Swagger/OpenAPI to use in any project type

26 lines (20 loc) 575 B
import { ModelAttributessModel } from './model-attributes.model'; export class ParameterModel extends ModelAttributessModel { parameterNameRef: string; get uri(): string { return `#/components/parameters/${this.parameterNameRef}`; } constructor( parameterNameRef: string, attributeModel?: ModelAttributessModel, ) { super(null); this.parameterNameRef = parameterNameRef; if (attributeModel) { Object.assign(this, attributeModel); } } getAttribute(): ModelAttributessModel { return this as ModelAttributessModel; } }