soundcloud / soundcloud/api

OpenAPI Spec contains validation errors

Open
#434 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
254
Forks
53
PR merge metrics
No merged PRs in 30d

Description

The current OpenAPI specification is not valid and cannot be used in tools like Swagger Editor or code generators.

Steps to Reproduce
1. Open Swagger Editor.
2. Paste the contents of the OpenAPI spec file.
3. Observe the validation errors.

Observed Errors

Swagger Editor reports multiple structural issues:

Errors
Hide
 
Structural error at components.parameters.comment_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.follower_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.following_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.playlist_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.fake_playlist_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.repost_playlist_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.track_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.test_track_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.user_id
should have required property 'required' missingProperty: required
Jump to line 0
Structural error at components.parameters.user_id_to_follow
should have required property 'required' missingProperty: required
Jump to line 0

The Apple OpenAPI code generator for Swift also fails with similar issues:

- Additional file comments: <none>/Users/obrhoff/Downloads/new_music_app/soundcloud-open-api-schema.yaml: error: Inconsistency encountered when parsing `comment_id` in Document.components.parameters: positional path parameters must be explicitly set to required.
Error: /Users/obrhoff/Downloads/new_music_app/soundcloud-open-api-schema.yaml: error: Inconsistency encountered when parsing `comment_id` in Document.components.parameters: positional path parameters must be explicitly set to required.
[generate] ERROR task failed

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the OpenAPI spec file referenced in the issue and paste it into Swagger Editor to reproduce the listed structural errors. Update the named component parameters so the specification validates, then confirm the Apple OpenAPI Swift generator no longer reports the positional path parameter error.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.