-
-
Save mohammedmatar/b2524f6c6a90d1f2622fc0c5be92dc1c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.0 | |
| servers: | |
| - url: 'http://petstore.swagger.io/v3' | |
| info: | |
| description: >- | |
| Flight Module helps control the process of bookings for customers regardless | |
| of direct customers | |
| * [The traveler himself] or an indirect agent [as a broker or representative to enable the booking of passengers and take a percentage about it] | |
| * In the form input called the company beneficiary | |
| * To complete the process of booking a flight ticket requires the existence of some basic data for booking | |
| * Which is the source company to remember the aviation in the form input includes all suppliers to choose the supplier or company source to remember this reservation | |
| * However, the name of the carrier must be included in the list of all carriers available to support booking airline tickets | |
| * The selection of the treasury that will be dealt with in the case of physical transactions from the payment of the customer to the company or the company paid the supplier costs of booking the ticket | |
| * Possibility to upload files with special booking as an example | |
| * [A copy of a birth certificate or a copy of your ID or a copy of your previous passport] All this with the PNR number for the booking | |
| * | |
| * After that, the directions of the trip will be used for this booking by adding from any place to any place will be traveling with the addition of the date of travel There are several cases of the direction of the trip can be oneway travel or round trip in the case of going and return is added more than one direction to the reservation | |
| * | |
| * After that you can add the prices of this special booking and prices detailed to several parts and prices are used to calculate the price to be paid by the client or traveler and the price of the outside company to remember the booking is a | |
| * Number of adult passengers and their names and total, fare, tax knowing that the sum of tax, fare equals the total | |
| With the addition of a special price of additional profit any additional | |
| profit if necessary to be used in the case of the existence of the fraction | |
| numbers at the final price because the deal is not dealt with the numbers in | |
| the Alastistm aviation | |
| * With the addition of if there is a commission for the client in the form of a commission or commission to suppliers in the form of commission outside | |
| version: 1.0.0 | |
| title: Flight Reservation System | |
| termsOfService: 'http://localhost/TrioTravel/flight' | |
| contact: | |
| email: [email protected] | |
| name: Yasmin Saed El_Deken | |
| url: [email protected] | |
| tags: | |
| - name: reservation | |
| description: 'store all flight reservation basic data ' | |
| - name: Directions | |
| description: Responsible for store all direction of one flight reservation | |
| - name: Prices | |
| description: >- | |
| Responsible for store all prices of one flight reservation and return | |
| final prices of this reservation | |
| - name: MemberTypes | |
| description: >- | |
| Responsible for all member types that allowed to found in flight | |
| reservation | |
| paths: | |
| '/removeFraction/{price}': | |
| get: | |
| summary: get flight reservations total price with out any fractions | |
| description: >- | |
| This process is responsible for removing the fractions in case they | |
| exist because the flight system does not deal with the fraction numbers | |
| parameters: | |
| - name: price | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| operationId: RemoveFraction | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid price | |
| '404': | |
| description: not found | |
| tags: | |
| - Prices | |
| /membertype: | |
| get: | |
| summary: get all flight member types | |
| description: show all flight member types that may be found in our flight system | |
| parameters: [] | |
| operationId: all | |
| responses: | |
| '200': | |
| description: successfully | |
| '404': | |
| description: not found | |
| tags: | |
| - MemberTypes | |
| post: | |
| summary: add new member type | |
| description: >- | |
| This process is responsible for adding any new category such as baby, | |
| child or adult based on age because prices vary according to age groups | |
| parameters: [] | |
| operationId: add | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| $ref: '#/components/schemas/flight_members_types' | |
| tags: | |
| - MemberTypes | |
| /prices: | |
| get: | |
| summary: Find Flight reservation Prices | |
| description: Returns a this reservation prices data | |
| operationId: getFlightPrices | |
| parameters: [] | |
| responses: | |
| '200': | |
| description: successful operation | |
| '404': | |
| description: flight not found | |
| tags: | |
| - Prices | |
| post: | |
| summary: add prices of this reservation by using it's serial number | |
| description: add prices values to this flight reservation | |
| operationId: addFlightPrices | |
| parameters: | |
| - name: id | |
| in: header | |
| description: ID of reservation that needs to be add to it this prices | |
| schema: | |
| type: integer | |
| format: int64 | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| security: [] | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| $ref: '#/components/schemas/flight_prices' | |
| tags: | |
| - Prices | |
| /reservation/attachment: | |
| post: | |
| summary: 'upload an image ' | |
| description: add image to data of this reservation data | |
| parameters: [] | |
| operationId: add | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| properties: | |
| file: | |
| type: integer | |
| path: | |
| type: string | |
| reservation_id: | |
| type: string | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| /reservation/file: | |
| post: | |
| summary: create new file number | |
| description: >- | |
| create new file number for specific client that want to use it in | |
| reservation | |
| parameters: [] | |
| operationId: add | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: invalid input | |
| '404': | |
| description: not found | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| owner_client_type: | |
| type: integer | |
| owner_client_id: | |
| type: string | |
| tags: | |
| - reservation | |
| /reservation/file_id: | |
| get: | |
| summary: get this file number to check if it is allow | |
| description: check if it is found and allow for this client | |
| parameters: | |
| - name: file_id | |
| in: query | |
| required: true | |
| schema: | |
| type: integer | |
| format: int64 | |
| operationId: getFile | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: invalid file number | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| /reservation/report/export: | |
| get: | |
| summary: export reservation data | |
| description: 'export reservation data pdf , word ,excel' | |
| parameters: | |
| - name: client_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: Passenger | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: Airlines | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: supplier_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: user_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: PNR | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: file | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: issue_date_from | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: issue_date_to | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| operationId: ExportReport | |
| responses: | |
| '200': | |
| description: successfully | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| /reservation/report: | |
| get: | |
| summary: 'get report about reservation data ' | |
| description: >- | |
| This process is responsible for producing reports on the work of | |
| reservations within the system | |
| parameters: | |
| - name: client_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: Passenger | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: Airlines | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: supplier_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: user_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: PNR | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: file | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: issue_date_from | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: issue_date_to | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| operationId: report | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| '/reservation/{id}': | |
| get: | |
| summary: get flight reservation by id | |
| description: >- | |
| This process is responsible for extracting certain reservation data | |
| using id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 0 | |
| format: int64 | |
| operationId: get | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| put: | |
| summary: edit reservation by id | |
| description: >- | |
| This process is responsible for modifying certain reservation data using | |
| id | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| $ref: '#/components/schemas/reservation' | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: put | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| delete: | |
| summary: remove reservation by id | |
| description: This process is responsible for remove certain reservation data using id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: remove | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| '/reservation/uploads/{id}': | |
| delete: | |
| summary: 'remove an uploaded file from this reservation data ' | |
| description: This process is responsible for remove certain uploaded file using id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: remove | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| '/reservation/uploads/{file}': | |
| get: | |
| summary: get reservation uploaded files | |
| description: >- | |
| This process is responsible for get certain reservation data based of | |
| file number | |
| parameters: | |
| - name: file | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: getReservationUploadedFiles | |
| responses: | |
| '200': | |
| description: successfully | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| '/direction/{id}': | |
| delete: | |
| summary: Deletes a direction of direction items of this reservation | |
| description: >- | |
| This process is responsible for delete certain reservation direction | |
| data based of it's id | |
| parameters: | |
| - name: id | |
| description: direction item id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: remove | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - Directions | |
| get: | |
| summary: get reservation direction by id | |
| description: >- | |
| This process is responsible for get certain reservation direction data | |
| based of it's id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| operationId: get | |
| responses: | |
| default: | |
| description: Default response | |
| tags: | |
| - Directions | |
| put: | |
| summary: edit direction content data | |
| description: >- | |
| This process is responsible for modifying certain reservation direction | |
| data based of it's id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| operationId: put | |
| responses: | |
| default: | |
| description: Default response | |
| tags: | |
| - Directions | |
| /reservation: | |
| get: | |
| summary: get all reservations based in pagination format | |
| description: 'This process is responsible for get all reservations data ' | |
| parameters: | |
| - name: skip | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| format: int64 | |
| minimum: 1 | |
| - name: take | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| format: int64 | |
| minimum: 1 | |
| operationId: all | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| post: | |
| summary: create new flight reservation data | |
| description: 'add new flight reservation data ' | |
| parameters: [] | |
| operationId: addFlightReserv | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| $ref: '#/components/schemas/reservation' | |
| tags: | |
| - reservation | |
| /reservation/client: | |
| post: | |
| summary: create new client | |
| description: add new client to use it as flight reservation beneficiary part | |
| parameters: [] | |
| operationId: add | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| name: | |
| type: string | |
| client_type: | |
| type: integer | |
| tags: | |
| - reservation | |
| /direction: | |
| get: | |
| summary: Find flight reservation direction items by id | |
| description: return all this flight reservation directions | |
| operationId: getFlightDirections | |
| parameters: [] | |
| responses: | |
| '200': | |
| description: successfull operation | |
| '404': | |
| description: flight not found | |
| tags: | |
| - Directions | |
| post: | |
| summary: add new reservation directions | |
| description: add all directions values to this flight reservation | |
| operationId: addFlightDirections | |
| parameters: [] | |
| responses: | |
| '200': | |
| description: successfully | |
| '201': | |
| description: created | |
| '400': | |
| description: Invalid input | |
| '404': | |
| description: not found | |
| security: [] | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/flight_trip_direction_items' | |
| tags: | |
| - Directions | |
| '/membertype/{id}': | |
| get: | |
| summary: get special type using id | |
| description: >- | |
| This process is responsible for get certain reservation prices type name | |
| based of it's id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: get | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - MemberTypes | |
| put: | |
| summary: edit name of flight member type by id | |
| description: >- | |
| This process is responsible for modifying certain reservation prices | |
| type name based of it's id | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| $ref: '#/components/schemas/flight_members_types' | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: put | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - MemberTypes | |
| delete: | |
| summary: remove member type by id | |
| description: >- | |
| This process is responsible for delete certain reservation prices type | |
| name based of it's id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: remove | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - MemberTypes | |
| /reservation/filter: | |
| get: | |
| summary: get flight reservations based on filter data | |
| description: >- | |
| This process is responsible for get all reservations related with filter | |
| data | |
| parameters: | |
| - name: client_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: supplier_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: user_id | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: PNR | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: file | |
| in: query | |
| required: false | |
| schema: | |
| type: integer | |
| - name: issue_date_from | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| - name: issue_date_to | |
| in: query | |
| required: false | |
| schema: | |
| type: string | |
| operationId: filter | |
| responses: | |
| '200': | |
| description: successfully | |
| '404': | |
| description: not found | |
| tags: | |
| - reservation | |
| '/prices/{id}': | |
| put: | |
| summary: edit reservation prices data | |
| description: >- | |
| This process is responsible for modifying certain reservation direction | |
| data based of it's id | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| $ref: '#/components/schemas/flight_prices' | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| minimum: 1 | |
| format: int64 | |
| operationId: put | |
| responses: | |
| '200': | |
| description: successfully | |
| '400': | |
| description: Invalid id | |
| '404': | |
| description: not found | |
| tags: | |
| - Prices | |
| delete: | |
| summary: 'delete reservation prices ' | |
| description: >- | |
| This process is responsible for delete certain reservation direction | |
| data based of it's id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| format: '' | |
| operationId: remove | |
| responses: | |
| '200': | |
| description: successfully | |
| tags: | |
| - Prices | |
| get: | |
| summary: get reservation price based on id | |
| description: >- | |
| This process is responsible for get certain reservation price data based | |
| of it's id | |
| parameters: | |
| - name: id | |
| in: path | |
| required: true | |
| schema: | |
| type: integer | |
| operationId: get | |
| responses: | |
| default: | |
| description: Default response | |
| tags: | |
| - Prices | |
| components: | |
| schemas: | |
| uploads: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| file: | |
| type: integer | |
| format: int64 | |
| path: | |
| type: string | |
| xml: | |
| name: uploads | |
| flight_trip_direction_items: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| reservation_id: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| trip_from: | |
| type: string | |
| trip_to: | |
| type: string | |
| city_date: | |
| type: string | |
| xml: | |
| name: flight_trip_direction_items | |
| flight_prices: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| reservation_id: | |
| type: integer | |
| format: int64 | |
| number: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| traveler_name: | |
| type: string | |
| out_commission: | |
| type: string | |
| commission: | |
| type: string | |
| final_total: | |
| type: number | |
| additional_profit: | |
| type: number | |
| tax: | |
| type: number | |
| fare: | |
| type: number | |
| total_out_commission: | |
| type: number | |
| total: | |
| type: number | |
| total_commission: | |
| type: number | |
| customer: | |
| type: number | |
| supplier: | |
| type: number | |
| type: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| name: | |
| type: string | |
| xml: | |
| name: flight_members_types | |
| xml: | |
| name: flight_prices | |
| flight_members_types: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| name: | |
| type: string | |
| xml: | |
| name: flight_members_types | |
| reservation: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| conveyor_company: | |
| type: integer | |
| format: int64 | |
| user_id: | |
| type: integer | |
| format: int64 | |
| supplier: | |
| type: integer | |
| format: int64 | |
| client: | |
| type: integer | |
| format: int64 | |
| file: | |
| type: integer | |
| format: int64 | |
| edit_status: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| coming_back: | |
| type: integer | |
| format: int64 | |
| PNR: | |
| type: string | |
| format: '' | |
| notes: | |
| type: string | |
| format: '' | |
| date: | |
| type: string | |
| format: date | |
| price: | |
| type: number | |
| cost_price: | |
| type: number | |
| flight_prices: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| number: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| traveler_name: | |
| type: string | |
| out_commission: | |
| type: string | |
| commission: | |
| type: string | |
| final_total: | |
| type: number | |
| additional_profit: | |
| type: number | |
| tax: | |
| type: number | |
| fare: | |
| type: number | |
| total_out_commission: | |
| type: number | |
| total: | |
| type: number | |
| total_commission: | |
| type: number | |
| customer: | |
| type: number | |
| supplier: | |
| type: number | |
| type: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| name: | |
| type: string | |
| xml: | |
| name: flight_members_types | |
| xml: | |
| name: flight_prices | |
| flight_directions: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| trip_from: | |
| type: string | |
| trip_to: | |
| type: string | |
| city_date: | |
| type: string | |
| xml: | |
| name: flight_trip_direction_items | |
| uploads: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| format: int64 | |
| status: | |
| type: integer | |
| format: int64 | |
| file: | |
| type: integer | |
| format: int64 | |
| path: | |
| type: string | |
| xml: | |
| name: uploads | |
| xml: | |
| name: reservation | |
| links: {} | |
| callbacks: {} | |
| securitySchemes: {} | |
| security: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment