# openapi-parser

> Claude/Codex skill by [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars · Updated 2026-10-22

Parses complex OpenAPI specs and generates Drift test cases from them. Use whenever the user wants to generate, write, or scaffold Drift tests from an OpenAPI spec — especially when the spec contains complex schemas: anyOf/oneOf/allOf, discriminators, polymorphism, inheritance, $ref chains, regex patterns, enums, or optional fields. Use when the user asks to "create tests for an endpoint", "cover all response variants", "generate test cases from the spec", or says anything like "each viable combination of responses". Use when the user is trying to understand what values are valid for a complex schema field, or when they paste a spec path and ask what tests to write.

Tags: agent-skills, agents, claude-code-plugin, codex-plugin, contract-testing, copilot-cli-plugin, drift, pact, pactflow, skills, swagger-contract-testing

## Install

```sh
git clone https://github.com/pactflow/pactflow-agent-skills /tmp/pactflow-agent-skills && ln -s /tmp/pactflow-agent-skills/plugins/swagger-contract-testing/skills/openapi-parser ~/.claude/skills/openapi-parser
```

## From README

OpenAPI Parser Skill Reference files references/schema-patterns.md — how to interpret and enumerate every complex pattern (anyOf / oneOf / allOf / discriminator / $ref / enum / pattern / nullable / optional), with real examples from snyk, digitalocean, posthog, and front/core specs references/drift-mapping.md — how to map enumerated schema variants to Drift YAML, including datasets, expressions, lifecycle hooks for stateful cases, and expected response matchers for each pattern type Workflow OpenAPI version: This skill targets OpenAPI 3.x. Swagger 2.0 specs use the same structural patterns ($ref, allOf, oneOf) but different envelope syntax — you may need to adapt field names manually. If working from the konfig-sdks/openapi-examples collection, see references/example-repos.md for navigation commands. Locate the endpoint Extract only what's needed: Extract: path/query/header parameters, request body schema, and each response status code's schema.

## Links

- HTML page: https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/openapi-parser/
- GitHub: https://github.com/pactflow/pactflow-agent-skills
- Author: [@pactflow](https://omgskills.com/library/pactflow/index.md)

## More from this repo

- [drift-testing](https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/drift-testing/index.md) — Verifies API implementations against OpenAPI specifications using the Drift CLI, catching spec drift and supporting...
   - [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars
- [oas-generator](https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/oas-generator/index.md) — Generates an OpenAPI 3.x YAML spec from a provider codebase using ripwire when no spec exists.
   - [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars
- [pact-coverage](https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/pact-coverage/index.md) — Runs a coverage check to find which API operations, status codes, request body required fields, and response body...
   - [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars
