If you're looking to implement the OpenApi specifications for your project, there are a variety of fields and values that need to be set. For a detailed look at these specifications, you can refer to the documentation here.
In an effort to streamline this process, I have begun creating a set of interfaces that define these specifications. Here's a sneak peek at what I have so far:
// Still a work in progress
export interface IEndpointDocs {
path: string,
methods: {
get?: IMethodDocs,
post?: IMethodDocs
}
}
export interface IMethodDocs {
description?: string,
operationId?: string,
produces?: Array<
| "application/json"
| "application/xml"
| "text/xml"
| "text/html"
>,
parameters: IMethodParameterDocs[],
}
export interface IMethodParameterDocs {
name: string,
in: "query" | "body" | "path",
description?: string,
required?: boolean,
// still under development
type?: "array",
items: {
type: "string"
},
collectionFormat: "csv"
format: "int32"
};
While I'm working on creating these interfaces from scratch, it's possible that similar work has already been done elsewhere. Where can one find existing versions of these interfaces?