Download packages/codemode/test/fixtures/openapi-happy-path.json from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 5.07 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/codemode/test/fixtures/openapi-happy-path.json
- Command line
-
hf download hf://SaylorTwift/opencode/packages/codemode/test/fixtures/openapi-happy-path.json
-
curl -L -o openapi-happy-path.json https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/codemode/test/fixtures/openapi-happy-path.json
5.07 kB
| { | |
| "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" | |
| } | |
| } | |
| } | |
| } | |