UNPKG

swagger-editor

Version:

- [Anonymized analytics](#anonymized-analytics) - [Getting started](#getting-started) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Usage](#usage) - [Development](#development) - [Prerequisites](#prerequisites) - [Setting

2 lines 142 kB
//#region src/plugins/editor-content-fixtures/selectors/selectOpenAPI320PetstoreYAML.js var e = () => "openapi: 3.2.0\ninfo:\n title: Swagger Petstore - OpenAPI 3.2\n description: |-\n This is a sample Pet Store Server based on the OpenAPI 3.2 specification. You can find out more about\n Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\n You can now help us improve the API whether it's by making changes to the definition itself or to the code.\n That way, with time, we can improve the API in general, and expose some of the new features in OAS 3.2.\n\n Some useful links:\n - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\n - [OpenAPI 3.2 Specification](https://spec.openapis.org/oas/v3.2.0.html)\n\n termsOfService: https://swagger.io/terms/\n contact:\n email: apiteam@swagger.io\n license:\n name: Apache 2.0\n url: https://www.apache.org/licenses/LICENSE-2.0.html\n version: 1.0.13\nexternalDocs:\n description: Find out more about Swagger\n url: https://swagger.io\nservers:\n - url: https://petstore32.swagger.io/api/v3\n description: Production server (OAS 3.2)\n - url: https://petstore-staging.swagger.io/api/v3\n description: Staging server\ntags:\n - name: pet\n summary: Pet management operations\n description: Everything about your Pets\n externalDocs:\n description: Find out more\n url: https://swagger.io\n - name: store\n summary: Store and order management\n description: Access to Petstore orders and inventory\n externalDocs:\n description: Find out more about our store\n url: https://swagger.io\n - name: user\n summary: User account operations\n description: Operations about user management and authentication\npaths:\n /pet:\n put:\n tags:\n - pet\n summary: Update an existing pet.\n description: Update an existing pet by Id.\n operationId: updatePet\n requestBody:\n description: Update an existent pet in the store\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/Pet'\n required: true\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid ID supplied\n '404':\n description: Pet not found\n '422':\n description: Validation exception\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n post:\n tags:\n - pet\n summary: Add a new pet to the store.\n description: Add a new pet to the store.\n operationId: addPet\n requestBody:\n description: Create a new pet in the store\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/Pet'\n required: true\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid input\n '422':\n description: Validation exception\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/findByStatus:\n get:\n tags:\n - pet\n summary: Finds Pets by status.\n description: Multiple status values can be provided with comma separated strings.\n operationId: findPetsByStatus\n parameters:\n - name: status\n in: query\n description: Status values that need to be considered for filter\n required: false\n explode: true\n schema:\n type: string\n default: available\n enum:\n - available\n - pending\n - sold\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid status value\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/findByTags:\n get:\n tags:\n - pet\n summary: Finds Pets by tags.\n description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n operationId: findPetsByTags\n parameters:\n - name: tags\n in: query\n description: Tags to filter by\n required: false\n explode: true\n schema:\n type: array\n items:\n type: string\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid tag value\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/search:\n query:\n tags:\n - pet\n summary: Advanced pet search with complex criteria\n description: |-\n Search for pets using complex criteria sent in the request body.\n The QUERY method is a new HTTP method in OAS 3.2 that allows sending\n a request body with search parameters, providing more flexibility than GET.\n\n This endpoint demonstrates the QUERY HTTP method introduced in OAS 3.2.0\n per draft-ietf-httpbis-safe-method-w-body.\n operationId: searchPets\n parameters:\n - name: limit\n in: query\n description: Maximum number of results to return\n required: false\n schema:\n type: integer\n default: 20\n maximum: 100\n - name: offset\n in: query\n description: Number of results to skip for pagination\n required: false\n schema:\n type: integer\n default: 0\n minimum: 0\n requestBody:\n description: Complex search criteria for finding pets\n required: true\n content:\n application/json:\n schema:\n type: object\n properties:\n name:\n type: string\n description: Filter by pet name (supports wildcards with *)\n example: \"Fluffy*\"\n species:\n type: string\n description: Filter by species\n enum:\n - cat\n - dog\n - bird\n - fish\n - rabbit\n - other\n example: \"cat\"\n ageRange:\n type: object\n description: Filter by age range\n properties:\n min:\n type: integer\n minimum: 0\n description: Minimum age in years\n max:\n type: integer\n minimum: 0\n description: Maximum age in years\n example:\n min: 1\n max: 5\n status:\n type: array\n description: Filter by status (multiple values allowed)\n items:\n type: string\n enum:\n - available\n - pending\n - sold\n example: [\"available\", \"pending\"]\n tags:\n type: array\n description: Filter by tags (AND logic - pet must have all tags)\n items:\n type: string\n example: [\"friendly\", \"indoor\", \"trained\"]\n priceRange:\n type: object\n description: Filter by price range\n properties:\n min:\n type: number\n format: float\n minimum: 0\n max:\n type: number\n format: float\n minimum: 0\n example:\n min: 100.0\n max: 500.0\n sortBy:\n type: string\n description: Sort results by field\n enum:\n - name\n - age\n - price\n - status\n default: name\n example: \"price\"\n sortOrder:\n type: string\n description: Sort order\n enum:\n - asc\n - desc\n default: asc\n example: \"asc\"\n examples:\n searchFriendlyCats:\n summary: Search for friendly cats\n description: Find available cats under 5 years old with friendly temperament\n value:\n species: \"cat\"\n ageRange:\n min: 0\n max: 5\n status: [\"available\"]\n tags: [\"friendly\"]\n sortBy: \"age\"\n sortOrder: \"asc\"\n searchAffordableDogs:\n summary: Search for affordable dogs\n description: Find dogs within a budget range\n value:\n species: \"dog\"\n priceRange:\n min: 100\n max: 300\n status: [\"available\"]\n sortBy: \"price\"\n sortOrder: \"asc\"\n responses:\n '200':\n description: Search results with pagination metadata\n content:\n application/json:\n schema:\n type: object\n properties:\n results:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n total:\n type: integer\n description: Total number of matching results\n limit:\n type: integer\n description: Maximum results per page\n offset:\n type: integer\n description: Current offset\n hasMore:\n type: boolean\n description: Whether there are more results available\n examples:\n searchResults:\n summary: Example search results\n value:\n results:\n - id: 10\n name: \"Fluffy\"\n category:\n id: 1\n name: \"Cats\"\n status: \"available\"\n tags:\n - id: 1\n name: \"friendly\"\n - id: 2\n name: \"indoor\"\n photoUrls:\n - \"https://example.com/photos/fluffy.jpg\"\n total: 42\n limit: 20\n offset: 0\n hasMore: true\n '400':\n description: Invalid search criteria\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Error'\n '413':\n description: Request payload too large\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Error'\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - read:pets\n /pet/{petId}:\n get:\n tags:\n - pet\n summary: Find pet by identifier.\n description: Returns a single pet.\n operationId: getPetById\n parameters:\n - name: petId\n in: path\n description: ID of pet to return\n required: true\n schema:\n type: integer\n format: int64\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid ID supplied\n '404':\n description: Pet not found\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - api_key: []\n - petstore_auth:\n - write:pets\n - read:pets\n post:\n tags:\n - pet\n summary: Updates a pet in the store with form data.\n description: update a pet via the form data.\n operationId: updatePetWithForm\n parameters:\n - name: petId\n in: path\n description: ID of pet that needs to be updated\n required: true\n schema:\n type: integer\n format: int64\n - name: name\n in: query\n description: Name of pet that needs to be updated\n schema:\n type: string\n - name: status\n in: query\n description: Status of pet that needs to be updated\n schema:\n type: string\n responses:\n '200':\n description: successfully updated\n '400':\n description: Invalid input\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n delete:\n tags:\n - pet\n summary: Deletes a pet.\n description: delete a pet.\n operationId: deletePet\n parameters:\n - name: api_key\n in: header\n description: ''\n required: false\n schema:\n type: string\n - name: petId\n in: path\n description: Pet id to delete\n required: true\n schema:\n type: integer\n format: int64\n responses:\n '200':\n description: successful operation\n '400':\n description: Invalid pet value\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/{petId}/uploadImage:\n post:\n tags:\n - pet\n summary: Uploads an image.\n description: Upload an image of pet.\n operationId: uploadFile\n parameters:\n - name: petId\n in: path\n description: ID of pet to update\n required: true\n schema:\n type: integer\n format: int64\n - name: additionalMetadata\n in: query\n description: Additional Metadata\n required: false\n schema:\n type: string\n requestBody:\n content:\n application/octet-stream:\n schema:\n type: string\n format: binary\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ApiResponse'\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /store/inventory:\n get:\n tags:\n - store\n summary: Returns pet inventories by status.\n description: Returns a map of status codes to quantities.\n operationId: getInventory\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n type: object\n additionalProperties:\n type: integer\n format: int32\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - api_key: []\n /store/order:\n post:\n tags:\n - store\n summary: Place an order for a pet.\n description: Place a new order in the store.\n operationId: placeOrder\n requestBody:\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Order'\n application/xml:\n schema:\n $ref: '#/components/schemas/Order'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/Order'\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Order'\n '400':\n description: Invalid input\n '422':\n description: Validation exception\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n /store/order/search:\n query:\n tags:\n - store\n summary: Search orders with complex filters\n description: |-\n Search for orders using complex criteria in the request body.\n Demonstrates the QUERY HTTP method for advanced order filtering.\n\n The QUERY method allows passing complex search parameters in a structured\n request body while maintaining the safe and idempotent semantics of GET.\n operationId: searchOrders\n parameters:\n - name: page\n in: query\n description: Page number for pagination\n schema:\n type: integer\n default: 1\n minimum: 1\n - name: pageSize\n in: query\n description: Number of results per page\n schema:\n type: integer\n default: 20\n minimum: 1\n maximum: 100\n requestBody:\n description: Order search criteria\n required: true\n content:\n application/json:\n schema:\n type: object\n properties:\n orderId:\n type: integer\n format: int64\n description: Search by specific order ID\n petId:\n type: integer\n format: int64\n description: Filter by pet ID\n status:\n type: array\n description: Filter by order status\n items:\n type: string\n enum:\n - placed\n - approved\n - delivered\n example: [\"approved\", \"delivered\"]\n dateRange:\n type: object\n description: Filter by ship date range\n properties:\n from:\n type: string\n format: date-time\n description: Start date (inclusive)\n to:\n type: string\n format: date-time\n description: End date (inclusive)\n example:\n from: \"2024-01-01T00:00:00Z\"\n to: \"2024-12-31T23:59:59Z\"\n quantityRange:\n type: object\n description: Filter by quantity range\n properties:\n min:\n type: integer\n minimum: 0\n max:\n type: integer\n minimum: 0\n example:\n min: 1\n max: 10\n complete:\n type: boolean\n description: Filter by completion status\n example: true\n sortBy:\n type: string\n enum:\n - id\n - shipDate\n - quantity\n - status\n default: shipDate\n description: Field to sort by\n sortOrder:\n type: string\n enum:\n - asc\n - desc\n default: desc\n description: Sort direction\n examples:\n recentCompletedOrders:\n summary: Recent completed orders\n description: Find recently delivered orders from the last month\n value:\n status: [\"delivered\"]\n complete: true\n dateRange:\n from: \"2024-11-01T00:00:00Z\"\n to: \"2024-11-30T23:59:59Z\"\n sortBy: \"shipDate\"\n sortOrder: \"desc\"\n bulkOrders:\n summary: Bulk orders\n description: Find orders with quantity greater than 5\n value:\n quantityRange:\n min: 5\n status: [\"approved\", \"delivered\"]\n sortBy: \"quantity\"\n sortOrder: \"desc\"\n responses:\n '200':\n description: Search results with pagination\n content:\n application/json:\n schema:\n type: object\n properties:\n orders:\n type: array\n items:\n $ref: '#/components/schemas/Order'\n pagination:\n type: object\n properties:\n page:\n type: integer\n pageSize:\n type: integer\n totalPages:\n type: integer\n totalResults:\n type: integer\n examples:\n orderResults:\n summary: Example order search results\n value:\n orders:\n - id: 10\n petId: 198772\n quantity: 7\n shipDate: \"2024-11-15T10:30:00Z\"\n status: \"delivered\"\n complete: true\n - id: 11\n petId: 198773\n quantity: 3\n shipDate: \"2024-11-14T14:20:00Z\"\n status: \"delivered\"\n complete: true\n pagination:\n page: 1\n pageSize: 20\n totalPages: 3\n totalResults: 45\n '400':\n description: Invalid search parameters\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Error'\n '413':\n description: Request payload too large\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Error'\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - api_key: []\n /store/order/{orderId}:\n get:\n tags:\n - store\n summary: Find purchase order by identifier.\n description: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n operationId: getOrderById\n parameters:\n - name: orderId\n in: path\n description: ID of order that needs to be fetched\n required: true\n schema:\n type: integer\n format: int64\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Order'\n application/xml:\n schema:\n $ref: '#/components/schemas/Order'\n '400':\n description: Invalid ID supplied\n '404':\n description: Order not found\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n delete:\n tags:\n - store\n summary: Delete purchase order by identifier.\n description: For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n operationId: deleteOrder\n parameters:\n - name: orderId\n in: path\n description: ID of the order that needs to be deleted\n required: true\n schema:\n type: integer\n format: int64\n responses:\n '200':\n description: successful operation\n '400':\n description: Invalid ID supplied\n '404':\n description: Order not found\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n /user:\n post:\n tags:\n - user\n summary: Create user.\n description: This can only be done by the logged in user.\n operationId: createUser\n requestBody:\n description: Created user object\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/User'\n application/xml:\n schema:\n $ref: '#/components/schemas/User'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/User'\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/User'\n application/xml:\n schema:\n $ref: '#/components/schemas/User'\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n /user/createWithList:\n post:\n tags:\n - user\n summary: Creates list of users with given input array.\n description: Creates list of users with given input array.\n operationId: createUsersWithListInput\n requestBody:\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/User'\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/User'\n application/xml:\n schema:\n $ref: '#/components/schemas/User'\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n /user/login:\n get:\n tags:\n - user\n summary: Logs user into the system.\n description: log user into the system.\n operationId: loginUser\n parameters:\n - name: username\n in: query\n description: The user name for login\n required: false\n schema:\n type: string\n - name: password\n in: query\n description: The password for login in clear text\n required: false\n schema:\n type: string\n responses:\n '200':\n description: successful operation\n headers:\n X-Rate-Limit:\n description: calls per hour allowed by the user\n schema:\n type: integer\n format: int32\n X-Expires-After:\n description: date in UTC when token expires\n schema:\n type: string\n format: date-time\n content:\n application/xml:\n schema:\n type: string\n application/json:\n schema:\n type: string\n '400':\n description: Invalid username/password supplied\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n /user/logout:\n get:\n tags:\n - user\n summary: Logs out current logged in user session.\n description: Log user out of system.\n operationId: logoutUser\n parameters: []\n responses:\n '200':\n description: successful operation\n default:\n description: successful operation\n /user/{username}:\n get:\n tags:\n - user\n summary: Get user by user name.\n description: Get user details based on username.\n operationId: getUserByName\n parameters:\n - name: username\n in: path\n description: The name that needs to be fetched. Use user1 for testing\n required: true\n schema:\n type: string\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/User'\n application/xml:\n schema:\n $ref: '#/components/schemas/User'\n '400':\n description: Invalid username supplied\n '404':\n description: User not found\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n put:\n tags:\n - user\n summary: Update user.\n description: This can only be done by the logged in user.\n operationId: updateUser\n parameters:\n - name: username\n in: path\n description: name that need to be deleted\n required: true\n schema:\n type: string\n requestBody:\n description: Update an existent user in the store\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/User'\n application/xml:\n schema:\n $ref: '#/components/schemas/User'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/User'\n responses:\n '200':\n description: successful operation\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n delete:\n tags:\n - user\n summary: Delete user.\n description: This can only be done by the logged in user.\n operationId: deleteUser\n parameters:\n - name: username\n in: path\n description: The name that needs to be deleted\n required: true\n schema:\n type: string\n responses:\n '200':\n description: successful operation\n '400':\n description: Invalid username supplied\n '404':\n description: User not found\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\ncomponents:\n schemas:\n Order:\n type: object\n properties:\n id:\n type: integer\n format: int64\n examples: [10]\n petId:\n type: integer\n format: int64\n examples: [198772]\n quantity:\n type: integer\n format: int32\n examples: [7]\n shipDate:\n type: string\n format: date-time\n status:\n type: string\n description: Order Status\n examples: [approved]\n enum:\n - placed\n - approved\n - delivered\n complete:\n type: boolean\n xml:\n name: order\n Customer:\n type: object\n properties:\n id:\n type: integer\n format: int64\n examples: [100000]\n username:\n type: string\n examples: [fehguy]\n address:\n type: array\n xml:\n name: addresses\n wrapped: true\n items:\n $ref: '#/components/schemas/Address'\n xml:\n name: customer\n Address:\n type: object\n properties:\n street:\n type: string\n examples: [437 Lytton]\n city:\n type: string\n examples: [Palo Alto]\n state:\n type: string\n examples: [CA]\n zip:\n type: string\n examples: ['94301']\n xml:\n name: address\n Category:\n type: object\n properties:\n id:\n type: integer\n format: int64\n examples: [1]\n name:\n type: string\n examples: [Dogs]\n xml:\n name: category\n User:\n type: object\n properties:\n id:\n type: integer\n format: int64\n examples: [10]\n username:\n type: string\n examples: [theUser]\n firstName:\n type: string\n examples: [John]\n lastName:\n type: string\n examples: [James]\n email:\n type: string\n examples: [john@email.com]\n password:\n type: string\n examples: ['12345']\n phone:\n type: string\n examples: ['12345']\n userStatus:\n type: integer\n description: User Status\n format: int32\n examples: [1]\n xml:\n name: user\n Tag:\n type: object\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n xml:\n name: tag\n Pet:\n required:\n - name\n - photoUrls\n type: object\n properties:\n id:\n type: integer\n format: int64\n examples: [10]\n name:\n type: string\n examples: [doggie]\n category:\n $ref: '#/components/schemas/Category'\n photoUrls:\n type: array\n xml:\n wrapped: true\n items:\n type: string\n xml:\n name: photoUrl\n tags:\n type: array\n xml:\n wrapped: true\n items:\n $ref: '#/components/schemas/Tag'\n status:\n type: string\n description: pet status in the store\n enum:\n - available\n - pending\n - sold\n xml:\n name: pet\n ApiResponse:\n type: object\n properties:\n code:\n type: integer\n format: int32\n type:\n type: string\n message:\n type: string\n xml:\n name: '##default'\n Error:\n type: object\n properties:\n code:\n type: string\n message:\n type: string\n required:\n - code\n - message\n requestBodies:\n Pet:\n description: Pet object that needs to be added to the store\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n UserArray:\n description: List of user object\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/User'\n securitySchemes:\n petstore_auth:\n type: oauth2\n flows:\n implicit:\n authorizationUrl: https://petstore3.swagger.io/oauth/authorize\n scopes:\n \"write:pets\": modify pets in your account\n \"read:pets\": read your pets\n api_key:\n type: apiKey\n name: api_key\n in: header\n", t = () => "openapi: 3.1.0\ninfo:\n title: Swagger Petstore - OpenAPI 3.1\n description: |-\n This is a sample Pet Store Server based on the OpenAPI 3.1 specification. You can find out more about\n Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\n You can now help us improve the API whether it's by making changes to the definition itself or to the code.\n That way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n Some useful links:\n - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\n\n termsOfService: https://swagger.io/terms/\n contact:\n email: apiteam@swagger.io\n license:\n name: Apache 2.0\n url: https://www.apache.org/licenses/LICENSE-2.0.html\n version: 1.0.12\nexternalDocs:\n description: Find out more about Swagger\n url: https://swagger.io\nservers:\n - url: https://petstore31.swagger.io/api/v3\ntags:\n - name: pet\n description: Everything about your Pets\n externalDocs:\n description: Find out more\n url: http://swagger.io\n - name: store\n description: Access to Petstore orders\n externalDocs:\n description: Find out more about our store\n url: http://swagger.io\n - name: user\n description: Operations about user\npaths:\n /pet:\n put:\n tags:\n - pet\n summary: Update an existing pet.\n description: Update an existing pet by Id.\n operationId: updatePet\n requestBody:\n description: Update an existent pet in the store\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/Pet'\n required: true\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid ID supplied\n '404':\n description: Pet not found\n '422':\n description: Validation exception\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n post:\n tags:\n - pet\n summary: Add a new pet to the store.\n description: Add a new pet to the store.\n operationId: addPet\n requestBody:\n description: Create a new pet in the store\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n application/x-www-form-urlencoded:\n schema:\n $ref: '#/components/schemas/Pet'\n required: true\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid input\n '422':\n description: Validation exception\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/findByStatus:\n get:\n tags:\n - pet\n summary: Finds Pets by status.\n description: Multiple status values can be provided with comma separated strings.\n operationId: findPetsByStatus\n parameters:\n - name: status\n in: query\n description: Status values that need to be considered for filter\n required: false\n explode: true\n schema:\n type: string\n default: available\n enum:\n - available\n - pending\n - sold\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid status value\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/findByTags:\n get:\n tags:\n - pet\n summary: Finds Pets by tags.\n description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n operationId: findPetsByTags\n parameters:\n - name: tags\n in: query\n description: Tags to filter by\n required: false\n explode: true\n schema:\n type: array\n items:\n type: string\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid tag value\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n /pet/{petId}:\n get:\n tags:\n - pet\n summary: Find pet by identifier.\n description: Returns a single pet.\n operationId: getPetById\n parameters:\n - name: petId\n in: path\n description: ID of pet to return\n required: true\n schema:\n type: integer\n format: int64\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Pet'\n application/xml:\n schema:\n $ref: '#/components/schemas/Pet'\n '400':\n description: Invalid ID supplied\n '404':\n description: Pet not found\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - api_key: []\n - petstore_auth:\n - write:pets\n - read:pets\n post:\n tags:\n - pet\n summary: Updates a pet in the store with form data.\n description: update a pet via the form data.\n operationId: updatePetWithForm\n parameters:\n - name: petId\n in: path\n description: ID of pet that needs to be updated\n required: true\n schema:\n type: integer\n format: int64\n - name: name\n in: query\n description: Name of pet that needs to be updated\n schema:\n type: string\n - name: status\n in: query\n description: Status of pet that needs to be updated\n schema:\n type: string\n responses:\n '200':\n description: successfully updated\n '400':\n description: Invalid input\n default:\n description: Unexpected error\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Error\"\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n delete:\n tags:\n - pet\n summary: Deletes a pet.\n description: delete a pet.\n operationId: deletePet\n parameters:\n - name: api_key\n in: header\n description: ''\n required: false\n schema:\n type: string\n - name: petId\n in: path\n description: Pet id to delete\n required: true\n schema:\n type: integer\n