@techntools/sequelize-to-openapi
Version:
OpenAPI 3 schemas from Sequelize models
62 lines (61 loc) • 1.81 kB
TypeScript
import { Association, ModelValidateOptions } from 'sequelize';
export default class OpenApiStrategy {
additionalProperties: boolean;
constructor(options?: {
additionalProperties?: boolean;
});
getPropertyExamples(examples: any[]): {
example: any[];
};
getPropertyForBase64Encoding(): {
format: string;
};
convertTypePropertyToAllowNull(type: [] | string): {
anyOf: [];
nullable: boolean;
type?: undefined;
} | {
type: string;
nullable: boolean;
anyOf?: undefined;
};
getPropertyForHasOneAssociation(associationName: string, association: Association): {
[x: string]: {
$ref: string;
};
};
getPropertyForBelongsToAssociation(associationName: string, association: Association): {
[x: string]: {
$ref: string;
};
};
getPropertyForHasManyAssociation(associationName: string, association: Association): {
[x: string]: {
type: string;
items: {
$ref: string;
};
};
};
getPropertyForBelongsToManyAssociation(associationName: string, association: Association): {
[x: string]: {
type: string;
items: {
allOf: ({
$ref: string;
type?: undefined;
properties?: undefined;
} | {
type: string;
properties: {
[x: number]: {
$ref: string;
};
};
$ref?: undefined;
})[];
};
};
};
getPropertiesForValidate(validate: ModelValidateOptions): {};
}