swagger-tools

“discriminator” in polymorphism, OpenAPI 2.0 (Swagger 2.0)

杀马特。学长 韩版系。学妹 提交于 2019-12-17 19:57:17
问题 Referencing OpenAPI 2.0, Schema Object, or Swagger 2.0, Schema Object, and the definition of discriminator field as: Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. My confusions/ questions: It is ambiguous

swagger tools error handler middleware not catching errors

霸气de小男生 提交于 2019-12-04 18:59:17
问题 overview My custom errorHandler middleware is not catching the swagger-tools request validator error. Instead, the swagger tools HTML error is sent back to the client. How can I get my errorHandler middleware to catch the swagger tools validation error and respond to the client accordingly? my prognosis I'm rather clueless unfortunately. No matter where I put the app.use(errorHandler) directive, the swagger tools html error is returned to the client and my errorHandler function never catches

swagger tools error handler middleware not catching errors

冷暖自知 提交于 2019-12-03 12:41:19
overview My custom errorHandler middleware is not catching the swagger-tools request validator error. Instead, the swagger tools HTML error is sent back to the client. How can I get my errorHandler middleware to catch the swagger tools validation error and respond to the client accordingly? my prognosis I'm rather clueless unfortunately. No matter where I put the app.use(errorHandler) directive, the swagger tools html error is returned to the client and my errorHandler function never catches the error. Maybe I'm overlooking something overtly incorrect about my setup. Below is my app.js file

“discriminator” in polymorphism, OpenAPI 2.0 (Swagger 2.0)

戏子无情 提交于 2019-11-28 11:54:25
Referencing OpenAPI 2.0, Schema Object , or Swagger 2.0, Schema Object , and the definition of discriminator field as: Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. My confusions/ questions: It is ambiguous to me, what role exactly it plays in inheritance or polymorphism. Could some one please explain