forked from opengeospatial/ogcapi-tiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openapi: Fixes for SwaggerUI reporting bundled API definition invalid
- Error was: "attribute components.schemas.tileSet.items is missing" - swagger-cli was declaring both the source and bundled definition as valid. - discovered the source of the issue with the IBM openapi-validator (https://github.com/IBM/openapi-validator) which uses Spectral and reported the error as somewhat less cryptic, pointing to missing "item" for array type in propertiesSchema.yaml - .validaterc configuration file avoiding the many warnings by default added
- Loading branch information
1 parent
ae6eefb
commit 170c1aa
Showing
3 changed files
with
138 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"shared": { | ||
"operations": { | ||
"no_operation_id": "warning", | ||
"operation_id_case_convention": [ | ||
"off" | ||
], | ||
"no_summary": "warning", | ||
"no_array_responses": "error", | ||
"parameter_order": "warning", | ||
"undefined_tag": "warning", | ||
"unused_tag": "warning", | ||
"operation_id_naming_convention": "off" | ||
}, | ||
"pagination": { | ||
"pagination_style": "warning" | ||
}, | ||
"parameters": { | ||
"no_parameter_description": "error", | ||
"param_name_case_convention": [ | ||
"off" | ||
], | ||
"invalid_type_format_pair": "off", | ||
"content_type_parameter": "error", | ||
"accept_type_parameter": "error", | ||
"authorization_parameter": "warning", | ||
"required_param_has_default": "warning" | ||
}, | ||
"paths": { | ||
"missing_path_parameter": "error", | ||
"duplicate_path_parameter": "warning", | ||
"snake_case_only": "off", | ||
"paths_case_convention": [ | ||
"off" | ||
] | ||
}, | ||
"responses": { | ||
"inline_response_schema": "warning" | ||
}, | ||
"security_definitions": { | ||
"unused_security_schemes": "warning", | ||
"unused_security_scopes": "warning" | ||
}, | ||
"security": { | ||
"invalid_non_empty_security_array": "error" | ||
}, | ||
"schemas": { | ||
"invalid_type_format_pair": "off", | ||
"snake_case_only": "off", | ||
"no_schema_description": "warning", | ||
"no_property_description": "warning", | ||
"description_mentions_json": "warning", | ||
"array_of_arrays": "warning", | ||
"inconsistent_property_type": [ | ||
"warning", | ||
[ | ||
"code", | ||
"default", | ||
"type", | ||
"value" | ||
] | ||
], | ||
"property_case_convention": [ | ||
"off" | ||
], | ||
"property_case_collision": "error", | ||
"enum_case_convention": [ | ||
"off" | ||
] | ||
}, | ||
"walker": { | ||
"no_empty_descriptions": "off", | ||
"has_circular_references": "warning", | ||
"$ref_siblings": "off", | ||
"duplicate_sibling_description": "warning", | ||
"incorrect_ref_pattern": "warning" | ||
} | ||
}, | ||
"swagger2": { | ||
"operations": { | ||
"no_consumes_for_put_or_post": "error", | ||
"get_op_has_consumes": "warning", | ||
"no_produces": "warning" | ||
} | ||
}, | ||
"oas3": { | ||
"operations": { | ||
"no_request_body_name": "warning" | ||
}, | ||
"responses": { | ||
"no_success_response_codes": "warning", | ||
"protocol_switching_and_success_code": "error", | ||
"no_response_body": "warning", | ||
"ibm_status_code_guidelines": "warning" | ||
}, | ||
"schemas": { | ||
"json_or_param_binary_string": "warning" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters