Skip to content
openapi-specification-v2 logo

Openapi Specification V2

openapi-specification-v2

OpenAPI (Swagger) 2.0 specification for describing REST APIs. Use when writing, validating, or interpreting Swagger 2.0 specs, generating clients/docs, or working with path/operation/parameter/response/schema/security definitions.

hairyf/skills467installs25stars

SKILL.md

Full skill instructions

OpenAPI Specification 2.0 (formerly Swagger 2.0) defines a JSON/​YAML format for describing RESTful APIs: paths, operations, parameters, responses, schemas, and security. Use this skill when creating or editing Swagger 2.0 specs, validating structure, or generating code/​documentation from them.

The skill is based on OpenAPI Specification 2.0, generated at 2026-01-30.

Core References

TopicDescriptionReference
Format and StructureDocument format, file structure, data typescore-format-and-structure
Fixed and Patterned FieldsFixed vs patterned field names in the schemacore-fixed-patterned-fields
Swagger ObjectRoot document, required/​optional fields, extensionscore-swagger-object
Info and MetadataInfo, Contact, License objectscore-info-metadata
Tags and External DocsTag Object, External Documentation Objectcore-tags-and-external-docs
Reference Object$ref, JSON Pointer, same-document and external file referencescore-reference-object
Data Types and FormatsPrimitives, format table, validation, file typecore-data-types-and-formats
MIME Typesconsumes/​produces, RFC 6838, examplescore-mime-types
HTTP Status CodesResponse keys, default response, IANA/​RFC 7231core-http-status-codes
Path TemplatingCurly braces, path parameters, name matchingcore-path-templating
Header ObjectResponse header definition (type, format, items, validation)core-header-object
Headers ObjectContainer for response headers (name → Header Object)core-headers-object
Items ObjectNon-body array items (parameters, headers)core-items-object
Example ObjectResponse examples by MIME typecore-example-object

Paths and Operations

TopicDescriptionReference
Paths and OperationsPaths Object, Path Item, Operation Objectpaths-and-operations
Path Item $refExternal path definition, conflict behaviorpath-item-ref

Parameters and Responses

TopicDescriptionReference
ParametersParameter locations (path, query, header, body, formData)parameters
collectionFormatcsv, ssv, tsv, pipes, multi and where they applyparameters-collection-format
Parameters Definitions (Reuse)Root-level parameters, reuse via $refparameters-definitions-reuse
ResponsesResponses Object, Response Objectresponses
Responses Definitions (Reuse)Root-level responses, reuse via $refresponses-definitions-reuse

Schemas and Definitions

TopicDescriptionReference
Schema and DefinitionsSchema Object, Definitions, composition, polymorphismschema-and-definitions
Schema JSON Schema KeywordsJSON Schema Draft 4 subset and Swagger-specific fieldsschema-json-schema-keywords

Security

TopicDescriptionReference
SecuritySecurity Definitions, Security Schemesecurity
Security Requirement ObjectApplying security at root/​operation, OR/​AND logicsecurity-requirement-object
Scopes ObjectOAuth2 scope name → descriptionsecurity-scopes-object
Basic and API Keybasic and apiKey Security Schemesecurity-basic-apikey
OAuth2 Flowsimplicit, password, application, accessCode and required URLssecurity-oauth2-flows

Best Practices

TopicDescriptionReference
Spec AuthoringoperationId, tags, responses, parameters, definitions, securitybest-practices-spec-authoring

Advanced

TopicDescriptionReference
Vendor Extensionsx- prefix, value types, where allowedadvanced-vendor-extensions
Security FilteringEmpty Paths, empty Path Item for access controladvanced-security-filtering
Extensions and XMLXML Object for schema propertiesadvanced-extensions-and-xml

More skills from hairyf

valtio logo
hairyf/skills

valtio

valtio

25 672
View
vitest logo
hairyf/skills

vitest

vitest

25 519
View
unjs logo
hairyf/skills

unjs

unjs

25 472
View
hairy logo
hairyf/skills

hairy

hairy

25 400
View
undocs logo
hairyf/skills

undocs

undocs

25 389
View
tsdown logo
hairyf/skills

tsdown

tsdown

25 376
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View