Details
-
Improvement
-
Status: Resolved
-
Medium
-
Resolution: Done
-
None
Description
In many cases (even when there is not YANG defined default value) we misuse default swagger property to set an example value. Instead use example property as specified in https://swagger.io/docs/specification/adding-examples/ to show example values in swagger UI and set default property only when defined type has “default“ value.
Attachments
Issue Links
- blocks
-
NETCONF-1026 OpenAPI: Use examples instead of example
-
- Open
-
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 105652,9 | Set example for enum type | master | netconf | Status: MERGED | +2 | +1 |
| 105809,6 | Set example for all types | master | netconf | Status: ABANDONED | -1 | +1 |
| 105874,24 | Set default for binary type | master | netconf | Status: MERGED | +2 | +1 |
| 105875,24 | Set default for union type | master | netconf | Status: MERGED | +2 | +1 |
| 105876,23 | Set default for boolean type | master | netconf | Status: MERGED | +2 | +1 |
| 105877,4 | Set example for identity-reference type | master | netconf | Status: ABANDONED | -1 | +1 |
| 105878,24 | Set default for bits type | master | netconf | Status: MERGED | +2 | +1 |
| 105879,26 | Set default for string type | master | netconf | Status: MERGED | +2 | +1 |
| 105880,30 | Set default for number type | master | netconf | Status: MERGED | +2 | +1 |
| 105881,35 | Set default for instance-identifier type | master | netconf | Status: MERGED | +2 | +1 |
| 106131,37 | Improve DefinitionGenerator testing | master | netconf | Status: MERGED | +2 | +1 |
| 106546,6 | Change default keyword to example | master | netconf | Status: MERGED | +2 | +1 |
| 107341,2 | Set default for binary type | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 107342,2 | Set default for union type | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 107343,2 | Set default for boolean type | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 107344,2 | Set default for bits type | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 107345,2 | Set default for string type | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 107346,2 | Set default for number type | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 107347,6 | Improve DefinitionGenerator testing | 6.0.x | netconf | Status: MERGED | +2 | +1 |
| 108614,1 | Set default for instance-identifier type | 6.0.x | netconf | Status: MERGED | +2 | +1 |