skip Swagger model properties when input_filter fields are incorrectly defined.
i have some routes defined that take advantage of the http-method-based input-filter-specs offered by zfcampus/zf-content-validation, namely an input-filter-spec for GET requests. this Swagger doc module isn't built to handle method-based models though, so i'm getting the following Fatal error in my error log:
this patch will fix the 500 error and restore my Swagger docs, but it doesn't solve the bigger question. if i choose to define different input-filter-specs for GET, POST, PUT, and PATCH, which one(s) should be used to define my Swagger model? i think GET shouldn't be considered because these are validator definitions for how my collection can be queried, and PATCH shouldn't be used since it's a partial model definition. we could check for POST and PUT input-filter-specs (in that order?) before falling back to the default.
this pull request acts as a safety net and will restore Swagger docs if anyone is using method-based input-filter-specs in their content-validation config.
skip Swagger model properties when input_filter fields are incorrectly defined.
i have some routes defined that take advantage of the http-method-based input-filter-specs offered by zfcampus/zf-content-validation, namely an input-filter-spec for GET requests. this Swagger doc module isn't built to handle method-based models though, so i'm getting the following Fatal error in my error log:
this patch will fix the 500 error and restore my Swagger docs, but it doesn't solve the bigger question. if i choose to define different input-filter-specs for GET, POST, PUT, and PATCH, which one(s) should be used to define my Swagger model? i think GET shouldn't be considered because these are validator definitions for how my collection can be queried, and PATCH shouldn't be used since it's a partial model definition. we could check for POST and PUT input-filter-specs (in that order?) before falling back to the default.
this pull request acts as a safety net and will restore Swagger docs if anyone is using method-based input-filter-specs in their content-validation config.