Skip to content

Use urls instead of url in Swagger UI#8

Open
mikaeldui wants to merge 2 commits into
masterfrom
url-to-urls
Open

Use urls instead of url in Swagger UI#8
mikaeldui wants to merge 2 commits into
masterfrom
url-to-urls

Conversation

@mikaeldui
Copy link
Copy Markdown
Collaborator

@mikaeldui mikaeldui commented Mar 23, 2022

Problem

Currently one needs to enter the path for the definition in order to view it. It's not obvious that there's a "swagger" version of the LCU API definition, neither that there are definitions for RCS available.
image

Solution

By using the urls property in Swagger, instead of url, it's possible to specify multiple API definitions for Swagger UI to show the user. It also enabled deep linking to a specific API definition.

Below is an example from the test Swagger UI for Help2Swagger.
image

@mikaeldui mikaeldui self-assigned this Mar 23, 2022
@mikaeldui mikaeldui added the enhancement New feature or request label Mar 23, 2022
@mikaeldui mikaeldui requested a review from MingweiSamuel March 23, 2022 21:14
@mikaeldui mikaeldui marked this pull request as ready for review March 23, 2022 21:14
Copy link
Copy Markdown
Collaborator Author

@mikaeldui mikaeldui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never edited a diff before, so this might not be correct.

Yup, the actions says I failed: https://github.com/MingweiSamuel/lcu-schema/runs/5667284565?check_suite_focus=true#step:3:46

@MingweiSamuel
Copy link
Copy Markdown
Owner

Best way is to generate a new diff:

  1. Clone the repo with submodules
  2. Applying the current diff
  3. Make the urls changes in the submodule
  4. Generate a new diff from that

@mikaeldui
Copy link
Copy Markdown
Collaborator Author

mikaeldui commented Mar 24, 2022

@MingweiSamuel, what do you think about adding lolgameapi-schema/openapi-lcd.json to the list of available definitions, as well as riotapi-schema/openapi-3.0.0.min.json etc., for easier discovery?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants