diff --git a/schema-types.json b/schema-types.json new file mode 100644 index 0000000..7cd540e --- /dev/null +++ b/schema-types.json @@ -0,0 +1,1067 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Support for different schema types", + "description": "Additionally some support for features that schema types may individually support.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schemaObject", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://httpbin.org" + } + ], + "tags": [ + { + "name": "Strings", + "description": "Showcasing handling and support for `type: string` schemas." + }, + { + "name": "Numbers", + "description": "Showcasing handling and support for `type: integer` and `type: number` schemas." + }, + { + "name": "Booleans", + "description": "Showcasing handling and support for `type: boolean` schemas." + }, + { + "name": "Arrays", + "description": "Showcasing handling and support for `type: array` schemas." + }, + { + "name": "Objects", + "description": "Showcasing handling and support for `type: object` schemas." + }, + { + "name": "Null", + "description": "Showcasing handling and support for `type: null` schemas." + }, + { + "name": "Mixed", + "description": "Showcasing handling and support for `type: [...]` schemas." + }, + { + "name": "Circular references", + "description": "Showcasing handling and support for circular references (`$ref` pointers)." + }, + { + "name": "ReadMe-flavors", + "description": "Showcasing handling and support for various ReadMe-flavored schema additions." + }, + { + "name": "Quirks", + "description": "Showcasing handling and support for various schema type quirks." + } + ], + "paths": { + "/anything/strings": { + "post": { + "operationId": "string_schemaSupport", + "summary": "String support", + "description": "Support and handling of `type: string` schemas.\n\nšŸ“š OpenAPI specification references:\n\n* [3.0.3 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schemaObject)\n\n* [3.1.0 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schemaObject)", + "tags": ["Strings"], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stock": { + "type": "string" + }, + "description (markdown)": { + "type": "string", + "description": "This is a string with a **markdown** description: [link](ref:action-object)" + }, + "title": { + "type": "string", + "title": "This string has a `title` property." + }, + "required": { + "type": "string", + "description": "This string should be required." + }, + "default": { + "type": "string", + "description": "This string has a `default` of `default value`.", + "default": "default value" + }, + "default (null)": { + "type": "string", + "description": "This string has a `default` of `null`.", + "default": null + }, + "default (required)": { + "type": "string", + "description": "This string has a `default` of `default value` and is required.", + "default": "default value" + }, + "nullable": { + "type": "string", + "description": "This string has is `nullable`.", + "nullable": true + }, + "enum": { + "type": "string", + "enum": ["available", "pending", "sold"] + }, + "enum (with default)": { + "type": "string", + "description": "This enum has a `default` of `available`.", + "enum": ["available", "pending", "sold"], + "default": "available" + }, + "enum (with default and required)": { + "type": "string", + "description": "This enum has a `default` of `available` and is required.", + "enum": ["available", "pending", "sold"], + "default": "available" + }, + "enum (with empty option)": { + "type": "string", + "description": "This enum has a an empty string (`\"\"`) as one of its available options.", + "enum": ["", "available", "pending", "sold"] + }, + "enum (with empty option and empty default)": { + "type": "string", + "description": "This enum has a an empty string (`\"\"`) as its only available option, and that same value is set as its `default`.", + "enum": [""], + "default": "" + } + }, + "required": ["required", "default (required)", "enum (with default and required)"] + } + } + } + } + }, + "put": { + "operationId": "string_formatSupport", + "summary": "`format` data types", + "description": "Handling of `format` data types on `type: string` schemas.\n\nšŸ“š OpenAPI specification references:\n\n* [3.0.3 Data Types](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#data-types)\n\n* [3.1.0 Data Types](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#dataTypes)", + "tags": ["Strings"], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "binary": { + "type": "string", + "format": "binary" + }, + "binary (with default)": { + "type": "string", + "format": "binary", + "default": "data:text/plain;name=file1.txt;base64,dGVzdDE=" + }, + "blob": { + "type": "string", + "description": "Strings with `format: blob` should render a `