# OpenAPI version identifier - required for OpenAPI 3.0 domains openapi: 3.0.0 ####################### # Optional info section ####################### info: title: Meta Components description: Meta components for TurboSMTP REST APIs version: '1.0.0-oas3' components: ####################### # Common path items ####################### pathitems: Countries: get: tags: - meta summary: Get countries security: - ApiKeyAuth: [ ] operationId: getCountries description: | Get countries responses: '200': description: Countries list content: application/json: schema: $ref: '#/components/schemas/CountryList' '401': $ref: 'https://api.swaggerhub.com/domains/turbo-smtp/shared/1.0.0-oas3#/components/responses/Unauthorized' States: get: tags: - meta summary: Get states by country security: - ApiKeyAuth: [ ] operationId: getStatesByCountry description: | Get states by country parameters: - $ref: '#/components/parameters/IsoCodePathParam' responses: # '200': # description: States selected # content: # application/json: # schema: # type: array # items: # $ref: '#/components/schemas/State' '401': $ref: 'https://api.swaggerhub.com/domains/turbo-smtp/shared/1.0.0-oas3#/components/responses/Unauthorized' #################### # Common data models #################### schemas: Country: type: object properties: iso_code: type: string example: "US" currency: type: string example: "USD" flag: type: string example: "πŸ‡ΊπŸ‡Έ" name: type: string example: "United States" phonecode: type: string example: "1" CountryList: type: array items: $ref: '#/components/schemas/Country' example: [ { "iso_code": "AF", "currency": "AFN", "flag": "πŸ‡¦πŸ‡«", "name": "Afghanistan", "phonecode": "93" }, { "iso_code": "AX", "currency": "EUR", "flag": "πŸ‡¦πŸ‡½", "name": "Aland Islands", "phonecode": "+358-18" }, { "iso_code": "AL", "currency": "ALL", "flag": "πŸ‡¦πŸ‡±", "name": "Albania", "phonecode": "355" } ] #################### # Common parameters #################### parameters: IsoCodePathParam: in: path name: isoCode required: true description: Country ISO code schema: type: string example: ES