You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating my own OpenAPI contract and I'm using SoundCloud's contract as reference. I noticed that examples to some paths' responses (e.g. 200 OK to GET /tracks/{track_urn}/comments) improperly reference other examples, this is visible in explorer.
I guess this can be fixed by using dataValue (introduced in oas 3.2.0) instead of value in components/examples/Comments or by defining proper example inside examples field in components/responses/Comments object. Old issue on thic topic: OAI/OpenAPI-Specification#1967
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm creating my own OpenAPI contract and I'm using SoundCloud's contract as reference. I noticed that examples to some paths' responses (e.g. 200 OK to GET /tracks/{track_urn}/comments) improperly reference other examples, this is visible in explorer.
This is how it looks like:
{ "collection": { "$ref": "#/components/examples/User/value" }, "next_href": "https://api.soundcloud.com/collection?page_size=10&cursor=1234567" }This is how it should like according to schema and referenced example:
{ "collection": [ { "body": "comment body", "created_at": "2007/09/11 15:40:24 +0000", "urn": "soundcloud:comments:1234", "kind": "comment", "timestamp": 4960, "track_urn": "soundcloud:tracks:123456", "uri": "https://api.soundcloud.com/comments/1234", "user": { "urn": "souncloud:users:12345", "kind": "user", "permalink": "permalink", "username": "user name", "last_modified": "2017/04/10 14:48:03 +0000", "uri": "https://api.soundcloud.com/users/12345", "permalink_url": "https://soundcloud.com/permalink", "avatar_url": "https://i1.sndcdn.com/avatars-large.jpg", "followers_count": 138, "followings_count": 172, "public_favorites_count": 5, "reposts_count": 0 }, "user_urn": "soundcloud:users:12345" } ], "next_href": "https://api.soundcloud.com/collection?page_size=10&cursor=1234567" }I guess this can be fixed by using
dataValue(introduced in oas 3.2.0) instead ofvaluein components/examples/Comments or by defining proper example insideexamplesfield in components/responses/Comments object. Old issue on thic topic: OAI/OpenAPI-Specification#1967Beta Was this translation helpful? Give feedback.
All reactions