OpenAPITools / OpenAPITools/openapi-diff
Mark down changelog generation - enum rename interpreted as added
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
I tested that on version 2.1.2 and 2.1.3. This unusual case but happened.
The following is modified excerpt of the json files. One of the enum field has bee renamed from 'StatusThree' to 'StatusNew'.
Then the change log has been generated in mark down format. The ideal case would be markdown reporting field renamed from A to B. The second best would be. A removed. B added. However markdown report states only the fact that B has been added.
Old Version:
{
"definitions": {
"SomeStatus": {
"description": "Some status description",
"enum": [
"StatusOne",
"StatusTwo",
"StatusThree"
],
"type": "string",
"x-ms-enum": {
"name": "SomeStatus",
"modelAsString": false,
"values": [
{
"name": "StatusOne",
"value": "StatusOne"
},
{
"name": "StatusTwo",
"value": "StatusTwo"
},
{
"name": "StatusThree",
"value": "StatusThree"
}
]
}
}
}
}
New version:
{
"definitions": {
"SomeStatus": {
"description": "Some status description",
"enum": [
"StatusOne",
"StatusTwo",
"StatusNew"
],
"type": "string",
"x-ms-enum": {
"name": "SomeStatus",
"modelAsString": false,
"values": [
{
"name": "StatusOne",
"value": "StatusOne"
},
{
"name": "StatusTwo",
"value": "StatusTwo"
},
{
"name": "StatusNew",
"value": "StatusNew"
}
]
}
}
}
}
Markdown output:
Changed response : 200 OK
Changed items (object):
* Changed property `status` (string)
Added enum value:
* `StatusNew`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.