-
Notifications
You must be signed in to change notification settings - Fork 37
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
Refactor: Uncouple from HTTP and use data models #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- can we get 404 for GET /museum-hours? or it will be 200 with empty
items: []
- can we get 404 for POST /special-events?
- there is 401 for DELETE /special-events/{eventId}? shouldn't we define security if we wan't to achieve it?
- can we get 404 for POST /tickets?
5ea9b56
to
b859726
Compare
@rudi23 Finally got back to this! I don't think the 404 responses make sense for the collection endpoints because they exist, I've defined them .... does that make sense? I picked up most of your other comments and removed the |
👍 Yes, I totally agree, not sure why I recommended 404 for the collection endpoint 😅 |
What/Why/How?
When we created the Museum API, we stopped iterating at the HTTP data transfer level. This PR doesn't change much of the API description (removed phone numbers from ticket records) but takes a more RESTful approach of modelling entities.
Still needs work: since the ID fields are readonly, I ran into Redocly/redocly-cli#1416 which marks the examples as invalid.
Check yourself
Security