Last active
May 4, 2020 22:35
-
-
Save develohpanda/0127e63fab0fa72e8eaefa076061bd15 to your computer and use it in GitHub Desktop.
Import via clipboard into Insomnia, and note the folders, requests, default Content-Type header, and environments created
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 | |
info: | |
version: 1.0.2 | |
title: Example | |
tags: | |
- name: folder one # converted to folders | |
- name: folder two | |
servers: | |
- url: https://petstore.swagger.io/v2 # converted to scheme, host, base_path env variables | |
paths: | |
/pet: | |
post: # operation | |
tags: | |
- folder one # add to folder | |
summary: Add a new pet to the store # request name | |
operationId: addPet # should be unique | |
parameters: | |
- in: header | |
name: Content-Type | |
schema: | |
type: string | |
default: application/json # https://swagger.io/docs/specification/media-types/ | |
required: true # enabled by default | |
put: | |
tags: | |
- folder one | |
summary: Update an existing pet | |
operationId: updatePet # should be unique | |
parameters: | |
- in: header | |
name: Content-Type | |
schema: | |
type: string | |
default: text/html | |
required: true | |
/pet/findByStatus: | |
get: | |
tags: | |
- folder two | |
summary: Finds Pets by status | |
description: Multiple status values can be provided with comma separated strings | |
operationId: findPetsByStatus # should be unique | |
parameters: | |
- name: status | |
in: query | |
description: Status values that need to be considered for filter | |
required: true | |
explode: true | |
schema: | |
type: array | |
items: | |
type: string | |
enum: | |
- available | |
- pending | |
- sold | |
default: available | |
"/pet/{variable}": | |
get: | |
tags: | |
- folder two | |
summary: Query with variable | |
security: | |
- bearerAuth: [] | |
components: | |
securitySchemes: | |
bearerAuth: # https://swagger.io/docs/specification/authentication/bearer-authentication/ | |
type: http | |
scheme: bearer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Folder, name, Content-Type header

Insomnia currently doesn't handle the bearerToken definition correctly (bottom, v7.1.1), but in the next release (top), it will add an environment variable for the token.
