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(tickets): added child and student ticket types #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ paths:
$ref: '#/components/responses/NotFound'
get:
summary: List special events
description: Return a list of upcoming special events at the museum.
description: Return a list of past special events at the museum. See one you like? Use this API to [buy a ticket](/#tag/Tickets/operation/buyMuseumTickets).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should still be upcoming special events rather than past ones - we may need to add a date filter and/or some further-in-the-future events!

And the URL should be a full URL, so that the description markdown is useful in any context.

operationId: listSpecialEvents
tags:
- Events
Expand Down Expand Up @@ -182,6 +182,10 @@ paths:
$ref: "#/components/examples/BuyGeneralTicketsRequestExample"
event_entry:
$ref: "#/components/examples/BuyEventTicketsRequestExample"
student_entry:
$ref: "#/components/examples/BuyStudentTicketsRequestExample"
child_entry:
$ref: "#/components/examples/BuyChildTicketsRequestExample"
responses:
"200":
description: Success.
Expand All @@ -194,6 +198,10 @@ paths:
$ref: "#/components/examples/BuyGeneralTicketsResponseExample"
event_entry:
$ref: "#/components/examples/BuyEventTicketsResponseExample"
student_entry:
$ref: "#/components/examples/BuyStudentTicketsResponseExample"
child_entry:
$ref: "#/components/examples/BuyChildTicketsResponseExample"
"400":
$ref: '#/components/responses/BadRequest'
"404":
Expand Down Expand Up @@ -221,11 +229,13 @@ paths:
components:
schemas:
TicketType:
description: Type of ticket being purchased. Use `general` for regular museum entry and `event` for tickets to special events.
description: Type of ticket being purchased. Use `general` for regular museum entry and `event` for tickets to special events. Use `student` for school-aged children. Visitors aged 0-5 are free.
Copy link
Contributor

Choose a reason for hiding this comment

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

For clarity, could we rephrase this to put the general, student and child tickets in one sentence, and the special event ones in another? I think it's age-related general entry, or an event ticket.

type: string
enum:
- event
- general
- student
- child
example: event
Date:
type: string
Expand Down Expand Up @@ -441,6 +451,20 @@ components:
eventId: dad4bce8-f5cb-4078-a211-995864315e39
ticketDate: '2023-09-05'
email: [email protected]
BuyStudentTicketsRequestExample:
summary: Student entry ticket
value:
ticketType: student
ticketDate: '2023-09-05'
school: Local Elementary School
email: [email protected]
BuyChildTicketsRequestExample:
summary: Child entry ticket
value:
ticketType: child
ticketDate: '2023-09-05'
childAge: 3
email: [email protected]
BuyGeneralTicketsResponseExample:
summary: General entry ticket
value:
Expand All @@ -458,6 +482,22 @@ components:
ticketType: event
ticketDate: '2023-09-05'
confirmationCode: ticket-event-9c55eg-8v82a
BuyStudentTicketsResponseExample:
summary: Student entry ticket
value:
message: Museum student entry ticket purchased
ticketId: 382c09393-0577-4g4v-88af-133352ad0f17a
ticketType: student
ticketDate: '2023-09-07'
confirmationCode: ticket-student-l3jf33-pre78
BuyChildTicketsResponseExample:
summary: Child entry ticket
value:
message: Museum child entry ticket purchased
ticketId: 382c09393-0577-4g4v-88af-133352ad0f17a
ticketType: child
ticketDate: '2023-09-07'
confirmationCode: ticket-child-j5gg99k-lpr78
CreateSpecialEventRequestExample:
summary: Create special event
value:
Expand Down
Loading