ePages-de / ePages-de/beyond-api-changelog

Changelog generator doesn't recognize nested properties

Open
#4 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
3
Forks
4
PR merge metrics
No merged PRs in 30d

Description

# Observed result

- If top-level properties are added to a payload, the are included in the [generated changelog](https://github.com/ePages-de/beyond-api-changelog/blob/master/beyond-api-changelog.md).
- If nested properties are added to a payload, they are **NOT** included in the [generated changelog](https://github.com/ePages-de/beyond-api-changelog/blob/master/beyond-api-changelog.md).

# Expected result

The Tech Writers also need the nested properties in the changelog.

# Steps to reproduce

1. Add a top level property to a response payload and a nested property

e.g.

```
diff --git a/openapi.yaml b/openapi.yaml
index a5fa0a1..d9c4374 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -19959,12 +19959,18 @@ definitions:
orderNote:
type: string
description: The merchant comment or note on the order.
+ orderNote2:
+ type: string
+ description: The merchant comment or note on the order 2.
taxTotal:
type: object
properties:
amount:
type: number
description: The amount of the tax total.
+ amount2:
+ type: number
+ description: The amount of the tax total 2.
currency:
type: string
description: The currency of the tax total.
```

2. Create a commit with this change
3. Execute the script which generates the diff

```
{
git show HEAD~1:openapi.yaml > ${SPEC_FILE_1}
git show HEAD:openapi.yaml > ${SPEC_FILE_2}

./diff.sh ${SPEC_FILE_1} ${SPEC_FILE_2}
}
```

Console output

```
linbook-jm:beyond-api-changelog (master) janux$ {
> git show HEAD~1:openapi.yaml > ${SPEC_FILE_1}
> git show HEAD:openapi.yaml > ${SPEC_FILE_2}
>
> ./diff.sh ${SPEC_FILE_1} ${SPEC_FILE_2}
> }
### What's New

### What's Deprecated

### What's Changed

* `GET` /orders/search/find-by-cart-id Show order by cart ID
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `POST` /orders/{id}/send-order-document Send order document
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `PUT` /orders/{orderId}/billing-address Update billing address
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `POST` /orders/{orderId}/cancel Cancel order
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `POST` /orders/{orderId}/create-invoice Create invoice
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `POST` /orders/{orderId}/mark-as-viewed Mark order as viewed
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `PUT` /orders/{orderId}/order-note Update order note
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

* `PUT` /orders/{orderId}/shipping-address Update shipping address
Return Type

Add orderNote2 //The merchant comment or note on the order 2.

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with diff.sh and the supplied openapi.yaml revision pair, then run the documented git show and ./diff.sh commands to reproduce the output. Trace how changed response properties are traversed and verify that nested additions such as taxTotal.amount2 appear in the generated changelog alongside top-level additions.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.