Closed WTIGER001 closed 4 years ago
OpenAPI 2 specs name even head
and options
methods as legitimate. If you think, they are not intended for direct invocation in your case, you should take care of their exclusion when the schema is generated.
I am confused then. Why does the MethodNames type then not include them ? When I try to use an options method I get an error where it goes to generate the method. The allowed field is undefined. Line 25 of 'process-methods.ts'
const allowed: string[] = conf.allowedParams[method.methodName];
returns an undefined value because 'options' is not an allowedParams property.
I have added a filter in front of the map function that generates each method. This filter removes the methods that are not configured. My only current example is a 'options' method that is needed for CORS support.