Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getErrorResponseSchema = () => {
const schema = errorSchema;
const response = new SchemaResponse(schema);
response.protocol = {
http: {
knownMediaType: KnownMediaType.Json,
statusCodes: ["default"],
mediaTypes: "application/json"
} as any
};
return response;
};
const get200ResponseSchema = (schema: Schema) => {
const get200ResponseSchema = (schema: Schema) => {
const response = new SchemaResponse(schema);
response.protocol = {
http: {
knownMediaType: KnownMediaType.Json,
statusCodes: [200],
mediaTypes: "application/json"
} as any
};
return response;
};