| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- {
- "openapi": "3.1.0",
- "info": {
- "title": "CodeMode Happy Path",
- "version": "1.0.0"
- },
- "servers": [
- {
- "url": "https://api.example.test/v1"
- }
- ],
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "paths": {
- "/users/{userId}": {
- "parameters": [
- {
- "$ref": "#/components/parameters/UserId"
- }
- ],
- "get": {
- "operationId": "users.get",
- "summary": "Get a user",
- "parameters": [
- {
- "name": "include",
- "in": "query",
- "style": "form",
- "explode": false,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- {
- "name": "verbose",
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "X-Trace-ID",
- "in": "header",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "$ref": "#/components/responses/UserResponse"
- }
- }
- },
- "delete": {
- "operationId": "users.remove",
- "summary": "Remove a user",
- "responses": {
- "204": {
- "description": "Removed"
- }
- }
- }
- },
- "/users": {
- "post": {
- "operationId": "users.create",
- "summary": "Create a user",
- "security": [
- {
- "ApiKey": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "email": {
- "type": "string",
- "format": "email"
- },
- "role": {
- "type": "string",
- "enum": [
- "admin",
- "member"
- ]
- }
- },
- "required": [
- "name",
- "email"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/vnd.example+json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- }
- }
- }
- },
- "/search": {
- "get": {
- "operationId": "search.run",
- "summary": "Search users",
- "security": [],
- "parameters": [
- {
- "name": "filter",
- "in": "query",
- "style": "deepObject",
- "explode": true,
- "schema": {
- "type": "object",
- "properties": {
- "query": {
- "type": "string"
- },
- "page": {
- "type": "integer"
- }
- },
- "required": [
- "query"
- ],
- "additionalProperties": false
- }
- },
- {
- "name": "tags",
- "in": "query",
- "style": "form",
- "explode": true,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Summary",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- },
- "components": {
- "parameters": {
- "UserId": {
- "name": "userId",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- },
- "responses": {
- "UserResponse": {
- "description": "A user",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- }
- },
- "schemas": {
- "User": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "email": {
- "type": "string",
- "format": "email"
- },
- "role": {
- "type": "string",
- "enum": [
- "admin",
- "member"
- ]
- }
- },
- "required": [
- "id",
- "name",
- "email"
- ],
- "additionalProperties": false
- }
- },
- "securitySchemes": {
- "BearerAuth": {
- "type": "http",
- "scheme": "bearer"
- },
- "ApiKey": {
- "type": "apiKey",
- "in": "query",
- "name": "api_key"
- }
- }
- }
- }
|