{"id":13942621,"url":"https://github.com/proohit/openapi-snippets","last_synced_at":"2026-03-07T19:07:24.039Z","repository":{"id":54734810,"uuid":"256450021","full_name":"proohit/openapi-snippets","owner":"proohit","description":"OpenAPI snippets and external file validation extension for VSCode","archived":false,"fork":false,"pushed_at":"2021-02-01T22:49:54.000Z","size":294,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-27T12:36:48.354Z","etag":null,"topics":["keybindings","oas3","openapi3","snippets","yaml","yml-files"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proohit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-17T08:46:16.000Z","updated_at":"2023-09-10T15:46:50.000Z","dependencies_parsed_at":"2022-08-14T01:10:41.411Z","dependency_job_id":null,"html_url":"https://github.com/proohit/openapi-snippets","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/proohit/openapi-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proohit%2Fopenapi-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proohit%2Fopenapi-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proohit%2Fopenapi-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proohit%2Fopenapi-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proohit","download_url":"https://codeload.github.com/proohit/openapi-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proohit%2Fopenapi-snippets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266076350,"owners_count":23872741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keybindings","oas3","openapi3","snippets","yaml","yml-files"],"created_at":"2024-08-08T02:01:57.481Z","updated_at":"2026-03-07T19:07:23.981Z","avatar_url":"https://github.com/proohit.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# OpenApi Snippets\n\n## Usage\n\n![snippet-preview](./openapi-snippets-preview.gif)\n\n### snippets\n\ncurrently supported snippets:\n\n|            Prefix | Content                                    |\n| ----------------: | ------------------------------------------ |\n|         `pathget` | GET path object                            |\n|    `pathgetparam` | GET path object with request parameters    |\n|        `pathpost` | POST path object                           |\n|         `pathput` | PUT path object                            |\n|    `pathputparam` | PUT path object with request parameters    |\n|      `pathdelete` | DELETE path object                         |\n| `pathdeleteparam` | DELETE path object with request parameters |\n|    `schemaObject` | Schema object                              |\n|  `propertyObject` | Property object for properties of a schema |\n|     `contentType` | Several content types                      |\n\n### Validation\n\nJSON and YAML/YML files are being validated according to their respective usage (e.g. Schema Objects). For schema specifications, see [OpenApi Specification v3](https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json)\n\n**Note**: For IntelliSense to validate the files, filenames have to match their respective schema:\n\n|       File name pattern | Example                     |\n| ----------------------: | --------------------------- |\n| `[components/schemas/\\* | \\*-schema].(json,yaml,yml)` | components/schemas/users.json |\n|              `[paths/\\* | \\*-path].(json,yaml,yml)`   | users-path.json |\n\nYou can navigate through predefined anchor points with TAB key. This only works right after inserting a snippet.\n\n**Note**: For YAML/YML files to be supported, the [YAML Extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) has to be installed!\n\n### Keybindings\n\nYou can configure custom keybindings for the snippets. For this, open the keybindings.json file of VS Code (Shortcut `Ctrl+K Ctrl+S`, then click on the `Open Keyboard Shortcuts (JSON)` button in the upper right corner).\nFor any keybinding, use this template and edit the fields which are marked by `\u003c\u003c\u003e\u003e`:\n\nfor json files:\n\n```json\n{\n  \"key\": \"\u003c\u003cYour desired shortcut\u003e\u003e\",\n  \"command\": \"editor.action.insertSnippet\",\n  \"when\": \"editorTextFocus\",\n  \"args\": {\n    \"langId\": \"json\",\n    \"name\": \"\u003c\u003cSnippet prefix\u003e\u003e\"\n  }\n}\n```\n\nfor yaml files:\n\n```json\n{\n  \"key\": \"\u003c\u003cYour desired shortcut\u003e\u003e\",\n  \"command\": \"editor.action.insertSnippet\",\n  \"when\": \"editorTextFocus\",\n  \"args\": {\n    \"langId\": \"yaml\",\n    \"name\": \"\u003c\u003cSnippet prefix\u003e\u003e\"\n  }\n}\n```\n\nFor `name` you can use any [snippet prefix](#snippets).\n\n## Installation\n\nJust download and install it from [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=proohit.openapi-snippets). There are no more settings, so the extension is ready to use after installation. It fully works with and extends [OpenAPI (Swagger) Editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproohit%2Fopenapi-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproohit%2Fopenapi-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproohit%2Fopenapi-snippets/lists"}