
Petstore OpenAPI 3.1 (Valid JSON)
A valid OpenAPI 3.1 pet-store SAMPLE spec in JSON: list/create pets with paginated responses for schema-validator and codegen tests.
- File
- JSON · Schema
- Use case
- Schema / OpenAPI testingJSON parsing+1· Conversion set
Valid and intentionally invalid OpenAPI/JSON Schema documents plus request/response examples for schema validators and API tooling.

A valid OpenAPI 3.1 pet-store SAMPLE spec in JSON: list/create pets with paginated responses for schema-validator and codegen tests.

YAML twin of the valid pet-store OpenAPI spec, for testing YAML spec parsers and JSON↔YAML conversion.

OpenAPI document with paths set to null, intentionally invalid for negative schema tests.

OpenAPI with a response schema $ref pointing at a missing component. Tests broken-reference detection.

OpenAPI with an unsupported openapi version string: negative case for version validators.

Draft 2020-12 JSON Schema for a user object with email format and role enum, paired with valid/invalid instances.

JSON instance conforming to the Wave F user JSON Schema: positive validator test case.

User JSON deliberately violating the schema five ways: negative case for validator error reporting.

Draft-07 JSON Schema describing a SAMPLE invoice object for domain-specific validator tests.

Draft-07 JSON Schema describing a SAMPLE event object for domain-specific validator tests.

Draft-07 JSON Schema describing a SAMPLE inventory item object for domain-specific validator tests.

Sample POST /pets request body matching the pet-store OpenAPI spec.

Sample paginated pet list response for mock-server and contract tests.

Sample 404 problem response for OpenAPI error-handling tests.


JSON Schema with a oneOf union over string vs number tagged objects, for testing union validation.

JSON Schema allOf merging id and name requirements. Tests composite schema validation.

Minimal OpenAPI 3.1 document with a webhooks section, for testing webhook-aware spec parsers.

Omitting type is legal JSON Schema. The x property has an empty subschema, x is optional, and non-object instances are not rejected by properties.

Intentionally invalid JSON Schema (json-schema-bad-ref) for negative validator tests.

The empty schema is valid and accepts every instance. The old invalid label was incorrect; no type or required-property constraint exists.

Draft-07 JSON Schema for payment amount/currency validation in fintech API tests.

Valid payment JSON instance paired with the payment JSON Schema.

Invalid payment JSON (negative amount, short currency) for schema error reporting tests.

OpenAPI document with empty paths but populated components. Tests partial spec loaders.

RFC 7807 SAMPLE problem document for HTTP 404 (Not Found) client tests.

RFC 7807 SAMPLE problem document for HTTP 401 (Unauthorized) client tests.

RFC 7807 SAMPLE problem document for HTTP 403 (Forbidden) client tests.

RFC 7807 SAMPLE problem document for HTTP 409 (Conflict) client tests.

RFC 7807 SAMPLE problem document for HTTP 410 (Gone) client tests.

RFC 7807 SAMPLE problem document for HTTP 429 (Too Many Requests) client tests.

RFC 7807 SAMPLE problem document for HTTP 422 (Unprocessable Entity) client tests.

RFC 7807 SAMPLE problem document for HTTP 400 (Bad Request) client tests.

RFC 7807 SAMPLE problem document for HTTP 415 (Unsupported Media Type) client tests.

RFC 7807 SAMPLE problem document for HTTP 406 (Not Acceptable) client tests.

RFC 7807 SAMPLE problem document for HTTP 503 (Service Unavailable) client tests.

RFC 7807 SAMPLE problem document for HTTP 500 (Internal Server Error) client tests.

Minimal JSON Schema SAMPLE focusing on additional properties false constraints.

Minimal JSON Schema SAMPLE focusing on one of status constraints.

Minimal JSON Schema SAMPLE focusing on enum currency constraints.

Minimal JSON Schema SAMPLE focusing on pattern sku constraints.

Minimal JSON Schema SAMPLE focusing on nullable optional constraints.

Minimal JSON Schema SAMPLE focusing on array unique items constraints.

Minimal JSON Schema SAMPLE focusing on dependent required constraints.

Minimal JSON Schema SAMPLE focusing on format uri email constraints.

The baseline member of a JSON Schema 2020-12 customer contract. Reference contract: id and name are required strings.

The compatible member of a JSON Schema 2020-12 customer contract. Backward compatible: existing instances remain valid because email is optional.

The breaking member of a JSON Schema 2020-12 customer contract. Breaking relative to baseline: id changes from string to integer and tenantId becomes required.

The baseline member of a complete OpenAPI 3.1 ticket endpoint contract. Reference API: string ticket IDs and required id/summary response properties.

The compatible member of a complete OpenAPI 3.1 ticket endpoint contract. Backward compatible: an optional priority response property is added and existing operations stay unchanged.

The breaking member of a complete OpenAPI 3.1 ticket endpoint contract. Breaking relative to baseline: ticket id becomes integer and status becomes a required response property.

The baseline proto3 Customer message for field-number and wire-compatibility testing. Reference wire contract: field 1 is string id and field 2 is string name.

The compatible proto3 Customer message for field-number and wire-compatibility testing. Backward compatible: existing field numbers/types are retained and optional email uses new field number 3.

The breaking proto3 Customer message for field-number and wire-compatibility testing. Breaking relative to baseline: field number 2 is reused with a different name and wire type.

The baseline Avro record schema for reader/writer compatibility tests. Reference writer schema: id and name are strings.

The compatible Avro record schema for reader/writer compatibility tests. Backward compatible for old records: nullable email is added with a null default.

The breaking Avro record schema for reader/writer compatibility tests. Breaking relative to baseline: id changes to long and tenantId has no default.

Valid Protobuf wire record with string, uint32, and string fields for schema-guided decoding. Stable P8 artifact p8-convert-protobuf-source.

Proto3 schema companion declaring the three fields used by the binary creator record. Stable P8 artifact p8-convert-protobuf-schema.

Expected JSON semantic result for the schema-guided Protobuf decode. Stable P8 artifact p8-convert-protobuf-expected.

Valid wire bytes intentionally supplied without a matching schema so tools must preserve unknown field 15. Stable P8 artifact p8-convert-protobuf-missing-schema.

OpenAI function tools definition JSON paired with the tool-calling traces.


SAMPLE tool-calling JSON (tool-call-weather) for agent harness schema tests.

SAMPLE tool-calling JSON (tool-result-weather) for agent harness schema tests.

SAMPLE tool-calling JSON (tool-call-search) for agent harness schema tests.

SAMPLE tool-calling JSON (tool-parallel-two) for agent harness schema tests.

SAMPLE tool-calling JSON (tool-error-unknown) for agent harness schema tests.

schema.org JSON-LD SAMPLE (faq-page) for SEO/structured-data validators.

schema.org JSON-LD SAMPLE (howto-step) for SEO/structured-data validators.

schema.org JSON-LD SAMPLE (organization) for SEO/structured-data validators.

schema.org JSON-LD SAMPLE (breadcrumb) for SEO/structured-data validators.

schema.org JSON-LD SAMPLE (software-app) for SEO/structured-data validators.

schema.org JSON-LD SAMPLE (web-page) for SEO/structured-data validators.