public class RuleConfiguration extends Object
| Constructor and Description |
|---|
RuleConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEnableApacheNginxUnderscoreRecommendation()
Gets whether we will raise awareness that header parameters with underscore may be ignored in Apache or Nginx by default.
|
boolean |
isEnableApiRequestUriWithBodyRecommendation()
Gets whether we will raise awareness a GET or HEAD operation is defined with body.
|
boolean |
isEnableInvalidTypeRecommendation()
Gets whether the recommendation check for for schemas containing invalid values for the 'type' attribute.
|
boolean |
isEnableNullableAttributeRecommendation()
Gets whether the recommendation check for for schemas containing the 'nullable' attribute.
|
boolean |
isEnableOneOfWithPropertiesRecommendation()
Gets whether the recommendation check for oneOf with sibling properties exists.
|
boolean |
isEnableRecommendations()
Get whether recommendations are enabled.
|
boolean |
isEnableSchemaTypeRecommendation()
Gets whether the recommendation check for for schemas containing type definitions.
|
boolean |
isEnableUnusedSchemasRecommendation()
Gets whether the recommendation to check for unused schemas is enabled.
|
void |
setEnableApacheNginxUnderscoreRecommendation(boolean enableApacheNginxUnderscoreRecommendation)
Enable or Disable the recommendation check for Apache/Nginx potentially ignoring header with underscore by default.
|
void |
setEnableApiRequestUriWithBodyRecommendation(boolean enableApiRequestUriWithBodyRecommendation)
Enable or Disable the recommendation check for GET or HEAD operations with bodies.
|
void |
setEnableInvalidTypeRecommendation(boolean enableInvalidTypeRecommendation)
Enable or Disable the recommendation check for the 'type' attribute.
|
void |
setEnableNullableAttributeRecommendation(boolean enableNullableAttributeRecommendation)
Enable or Disable the recommendation check for the 'nullable' attribute.
|
void |
setEnableOneOfWithPropertiesRecommendation(boolean enableOneOfWithPropertiesRecommendation)
Enable or Disable the recommendation check for schemas containing properties and oneOf definitions.
|
void |
setEnableRecommendations(boolean enableRecommendations)
Enable or Disable recommendations.
|
void |
setEnableSchemaTypeRecommendation(boolean enableSchemaTypeRecommendation)
Enable or Disable the recommendation check for schemas containing type definitions, specifically
for changes between OpenAPI 3.0.x and 3.1.
|
void |
setEnableUnusedSchemasRecommendation(boolean enableUnusedSchemasRecommendation)
Enable or Disable the recommendation check for unused schemas.
|
public boolean isEnableApacheNginxUnderscoreRecommendation()
true if enabled, false if disabledpublic void setEnableApacheNginxUnderscoreRecommendation(boolean enableApacheNginxUnderscoreRecommendation)
For more details, see isEnableApacheNginxUnderscoreRecommendation()
enableApacheNginxUnderscoreRecommendation - true to enable, false to disablepublic boolean isEnableApiRequestUriWithBodyRecommendation()
true if enabled, false if disabledpublic void setEnableApiRequestUriWithBodyRecommendation(boolean enableApiRequestUriWithBodyRecommendation)
For more details, see isEnableApiRequestUriWithBodyRecommendation()
enableApiRequestUriWithBodyRecommendation - true to enable, false to disablepublic boolean isEnableOneOfWithPropertiesRecommendation()
JSON Schema defines oneOf as a validation property which can be applied to any schema.
OpenAPI Specification is a variant of JSON Schema for which oneOf is defined as: "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema."
Where the only examples of oneOf in OpenAPI Specification are used to define either/or type structures rather than validations. Because of this ambiguity in the spec about what is non-standard about oneOf support, we'll warn as a recommendation that properties on the schema defining oneOf relationships may not be intentional in the OpenAPI Specification.
true if enabled, false if disabledpublic void setEnableOneOfWithPropertiesRecommendation(boolean enableOneOfWithPropertiesRecommendation)
For more details, see isEnableOneOfWithPropertiesRecommendation()
enableOneOfWithPropertiesRecommendation - true to enable, false to disablepublic void setEnableSchemaTypeRecommendation(boolean enableSchemaTypeRecommendation)
For more details, see isEnableSchemaTypeRecommendation()
enableSchemaTypeRecommendation - true to enable, false to disablepublic boolean isEnableSchemaTypeRecommendation()
In OpenAPI 3.0.x, the "type" attribute must be a string value. In OpenAPI 3.1, the type attribute may be: A string value The 'null' value An array containing primitive types and the 'null' value.
true if enabled, false if disabledpublic void setEnableNullableAttributeRecommendation(boolean enableNullableAttributeRecommendation)
For more details, see isEnableNullableAttributeRecommendation()
enableNullableAttributeRecommendation - true to enable, false to disablepublic boolean isEnableNullableAttributeRecommendation()
In OpenAPI 3.0.x, the "nullable" attribute is supported. However, because it is deprecated in 3.1 and above, a warning is logged to prepare for OpenAPI 3.1 recommendations. In OpenAPI 3.1, the 'nullable' attribute is deprecated. Instead the OpenAPI specification should use the 'null' type.
true if enabled, false if disabledpublic void setEnableInvalidTypeRecommendation(boolean enableInvalidTypeRecommendation)
For more details, see isEnableInvalidTypeRecommendation()
enableInvalidTypeRecommendation - true to enable, false to disablepublic boolean isEnableInvalidTypeRecommendation()
true if enabled, false if disabledpublic boolean isEnableRecommendations()
The 'type' attribute must be one of 'null', 'boolean', 'object', 'array', 'number', 'string', or 'integer'
true if enabled, false if disabledpublic void setEnableRecommendations(boolean enableRecommendations)
enableRecommendations - true to enable, false to disablepublic boolean isEnableUnusedSchemasRecommendation()
While the tooling may or may not support generation of models representing unused schemas, we take the stance that a schema which is defined but not referenced in an operation or by some schema bound to an operation may be a good indicator of a programming error. We surface this information to the user in case the orphaned schema(s) are not intentional.
true if enabled, false if disabledpublic void setEnableUnusedSchemasRecommendation(boolean enableUnusedSchemasRecommendation)
For more details, see isEnableUnusedSchemasRecommendation()
enableUnusedSchemasRecommendation - true to enable, false to disableCopyright © 2021. All rights reserved.