Skip to content

Commit b87db00

Browse files
authored
Update error code document of oav tool (#12358)
1 parent ffc5119 commit b87db00

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

documentation/Semantic-and-Model-Violations-Reference.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ This document lists the set of automated rules that can be validated against swa
3434
| [MAXIMUM_EXCLUSIVE](#MAXIMUM_EXCLUSIVE) | |
3535
| [OBJECT_PROPERTIES_MINIMUM](#OBJECT_PROPERTIES_MINIMUM) | |
3636
| [OBJECT_PROPERTIES_MAXIMUM](#OBJECT_PROPERTIES_MAXIMUM) | |
37-
| [OBJECT_MISSING_REQUIRED_PROPERTY_DEFINITION](#OBJECT_MISSING_REQUIRED_PROPERTY_DEFINITION) | |
3837
| [OBJECT_MISSING_REQUIRED_PROPERTY](#OBJECT_MISSING_REQUIRED_PROPERTY) | |
3938
| [OBJECT_ADDITIONAL_PROPERTIES](#OBJECT_ADDITIONAL_PROPERTIES) | |
4039
| [OBJECT_DEPENDENCY_KEY](#OBJECT_DEPENDENCY_KEY) | |
@@ -219,9 +218,9 @@ This document lists the set of automated rules that can be validated against swa
219218

220219
**Output Message**: Value is required but was not provided.
221220

222-
**Description**: Missing required value in example.
221+
**Description**: Missing required value in example or in traffic payload.
223222

224-
**How to fix the violation**: Add the required value in example.
223+
**How to fix the violation**: Add the required value in example or in traffic payload.
225224

226225
### <a name="REMOTE_NOT_VALID" />REMOTE_NOT_VALID
227226

@@ -513,11 +512,11 @@ This document lists the set of automated rules that can be validated against swa
513512

514513
### <a name="REQUEST_VALIDATION_ERROR" />REQUEST_VALIDATION_ERROR
515514

516-
**Output Message**: Found errors in validating the request for x-ms-example {0} in operation {1}.
515+
**Output Message**: Found errors in validating the request for x-ms-example {0} in operation {1} or in validating request payload.
517516

518-
**Description**: Validate the request of each x-ms-example.
517+
**Description**: Validate the request of each x-ms-example or traffic payload.
519518

520-
**How to fix the violation**: The request parameter defined in example should match with the swagger spec.
519+
**How to fix the violation**: The request parameter defined in example or in traffic payload should match with the swagger spec.
521520

522521
### <a name="RESPONSE_STATUS_CODE_NOT_IN_EXAMPLE" />RESPONSE_STATUS_CODE_NOT_IN_EXAMPLE
523522

@@ -539,7 +538,7 @@ This document lists the set of automated rules that can be validated against swa
539538

540539
**Output Message**: This operation does not have a defined {0} response code.
541540

542-
**Description**: The specified response code is not defined in example file.
541+
**Description**: The specified response code is not defined in example file or in traffic payload.
543542

544543
**How to fix the violation**: Add response code to default, or add response code definition in the swagger.
545544

@@ -555,9 +554,9 @@ This document lists the set of automated rules that can be validated against swa
555554

556555
**Output Message**: Additional properties not allowed:{0}.
557556

558-
**Description**: Additional property {0} defined in example but not defined in swagger spec. It could be the property name does not match exactly.
557+
**Description**: Additional property {0} defined in example or in traffic payload but not defined in swagger spec. It could be the property name does not match exactly.
559558

560-
**How to fix the violation**: The error info has the position of swagger. Look for the violation location of the swagger, ensure the property name specified in example appears exact the same in the definition or remove this property from example if it's not defined in swagger spec. Remind all the characters are case sensitive.
559+
**How to fix the violation**: The error info has the position of swagger. Look for the violation location of the swagger, ensure the property name specified in example or in traffic payload appears exact the same in the definition or remove this property from example or from traffic payload if it's not defined in swagger spec. Remind all the characters are case sensitive.
561560

562561

563562
### <a name="INVALID_FORMAT" />INVALID_FORMAT
@@ -574,43 +573,43 @@ This document lists the set of automated rules that can be validated against swa
574573

575574
**Description**: The type provided for the property doesn't match to the defined type.
576575

577-
**How to fix the violation**: Correct the type defined in example file. Sometimes this could be false positive when it peers with other errors which belongs to same parent `ANY_OF_MISSING` error or `ONE_OF_MISSING` error, in this case this error can be ignored and just fix other peer errors eventually this error will be cleared out automatically.
576+
**How to fix the violation**: Correct the type defined in example file or in traffic payload. Sometimes this could be false positive when it peers with other errors which belongs to same parent `ANY_OF_MISSING` error or `ONE_OF_MISSING` error, in this case this error can be ignored and just fix other peer errors eventually this error will be cleared out automatically.
578577

579578
### <a name="ENUM_CASE_MISMATCH" />ENUM_CASE_MISMATCH
580579

581580
**Output Message**: Enum does not match case for:{0}.
582581

583-
**Description**: The enum value provided in exmaple doesn't match the case of an allowed value.
582+
**Description**: The enum value provided in exmaple or in traffic payload doesn't match the case of an allowed value.
584583

585-
**How to fix the violation**: The error info has the position of swagger. Look for the violation location of the swagger, correct the value case in example.
584+
**How to fix the violation**: The error info has the position of swagger. Look for the violation location of the swagger, correct the value case in example or in traffic payload.
586585

587586
### <a name="ENUM_MISMATCH" />ENUM_MISMATCH
588587

589588
**Output Message**: Enum does not match case for:{0}.
590589

591-
**Description**: The enum value provided in exmaple doesn't match the case of an allowed value.
590+
**Description**: The enum value provided in exmaple or in traffic payload doesn't match the case of an allowed value.
592591

593-
**How to fix the violation**: The error info has the position of swagger. Look for the violation location of the swagger, correct the value case in example.
592+
**How to fix the violation**: The error info has the position of swagger. Look for the violation location of the swagger, correct the value case in example or in traffic payload.
594593

595594
### <a name="READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST" />READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST
596595

597596
**Output Message**: ReadOnly property `{0}: {1}`, cannot be sent in the request.
598597

599598
**Description**: The value of a readonly property is managed exclusively by the owning authority and cannot be supplied in request.
600599

601-
**How to fix the violation**: Remove the readonly property from the request parameters in example.
600+
**How to fix the violation**: Remove the readonly property from the request parameters in example or in traffic payload.
602601

603602
### <a name="OBJECT_MISSING_REQUIRED_PROPERTY" />OBJECT_MISSING_REQUIRED_PROPERTY
604603

605604
**Output Message**: Missing required property: {0}.
606605

607-
**Description**: The property {0} is required and has to provide in request or response of example.
606+
**Description**: The property {0} is required and has to provide in request or response of example (or of traffic payload).
608607

609-
**How to fix the violation**: Provide the requried property in example or remove this property from the required list of the definition in swagger spec. Or add items property if the type is array.
608+
**How to fix the violation**: Provide the requried property in example(or in traffic payload) or remove this property from the required list of the definition in swagger spec. Or add items property if the type is array.
610609

611610
### <a name="DISCRIMINATOR_VALUE_NOT_FOUND" />DISCRIMINATOR_VALUE_NOT_FOUND
612611

613-
**Output Message**: Discriminator value "{0}" not found
612+
**Output Message**: Discriminator value "{0}" not found.
614613

615614
**Description**: The property used as discriminator has a value {0} but it's not found in swagger spec.
616615

0 commit comments

Comments
 (0)