Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update API examples list to include Museum API #2506

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

lornajane
Copy link
Contributor

What/Why/How?

We have more modern examples that Redoc works pretty well with - so let's use them.

Fixes #2473

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@lornajane lornajane requested a review from a team as a code owner March 28, 2024 10:13
…n playground for local dev and some minor edits to redoc name
Copy link
Collaborator

@AlexVarchuk AlexVarchuk left a comment

Choose a reason for hiding this comment

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

Left few comments.
In general, I really like it. Finally, we will have a new example. 🙌

What do you think about adding more complicated examples (discriminator, oneOf, markdown with SchemaDefinition, if/then/else, additional properties, etc)? Not all of that but a few useful cases, I believe, it will make the example more fancy and useful. 🚀

type: number
format: float
example: 25
CreateSpecialEventRequest:
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is never used. Is it expected? I believe, we should use it in CreateSpecialEvent operation.

ticketType: event
ticketDate: 2023-09-05
confirmationCode: ticket-event-9c55eg-8v82a
CreateSpecialEventRequestExample:
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is never used. Should we use it with CreateSpecialEvent operation?

- 2023-09-05
- 2023-09-08
price: 0
CreateSpecialEventResponseExample:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same, it is never used.

- 2023-09-05
- 2023-09-08
price: 15
GetMuseumHours:
Copy link
Collaborator

Choose a reason for hiding this comment

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

the same. this example is not using.

- date: '2023-09-22'
timeOpen: '10:00'
timeClose: '16:00'
ClosedMuseumHours:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not used. Is it expected?

type: string
format: date
example: 2023-02-23
EndDate:
Copy link
Collaborator

Choose a reason for hiding this comment

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

we do not have ref for this. I believe we should use in inside listSpecialEvents operation

@lornajane
Copy link
Contributor Author

This is useful feedback, could you please add it over on the museum project https://github.com/Redocly/museum-openapi-example which is the source of truth for this file? We can bring a new version in to this project when we have one.

The purpose of this pull request is to use our existing Museum API as the main demo on https://github.com/Redocly/museum-openapi-example. I hope that you can help me to package it and push the correct content to the gh-pages branch. We need this for an upcoming event, and the issue had been open quite a while.

We can publish new Museum API versions as that project improves and evolves - but we need the demo updated with whatever we have, as soon as we can.

Copy link
Collaborator

@AlexVarchuk AlexVarchuk left a comment

Choose a reason for hiding this comment

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

Very weird but in Museum repo it works well. Fixed.
Today I am going to deploy gh-pages

@AlexVarchuk AlexVarchuk merged commit 3f3f955 into main Apr 2, 2024
7 checks passed
@AlexVarchuk AlexVarchuk deleted the use-museum-example branch April 2, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update sample to use Museum API
3 participants