const config = {
rest: {
port: +(process.env.PORT ?? 3000),
host: process.env.HOST,
// The `gracePeriodForClose` provides a graceful close for http/https
// servers with keep-alive clients. The default value is `Infinity`
// (don't force-close). If you want to immediately destroy all sockets
// upon stop, set its value to `0`.
// See https://www.npmjs.com/package/stoppable
gracePeriodForClose: 5000, // 5 seconds
openApiSpec: {
// useful when used with OpenAPI-to-GraphQL to locate your application
setServersFromRequest: true,
endpointMapping: {
"/openapi.json": { version: "3.0.0", format: "json" },
"/openapi.yaml": { version: "2.0.0", format: "yaml" },
},
},
},
}
after adding endpointMapping with yaml option it still doesn't give any way to generate the openapi.yaml spec it only works for json.
is there any other place where we need to do any changes ?
after adding
endpointMappingwithyamloption it still doesn't give any way to generate theopenapi.yamlspec it only works forjson.is there any other place where we need to do any changes ?