Last active
June 12, 2025 07:07
-
-
Save ivanlhz/f0d7fce62c2975c394a5fbb48521ab8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.0.0", | |
| "info": { | |
| "title": "DragonBall API", | |
| "version": "1.0" | |
| }, | |
| "paths": { | |
| "/characters": { | |
| "get": { | |
| "summary": "Get all Dragon Ball characters", | |
| "operationId": "get_characters", | |
| "parameters": [ | |
| { | |
| "name": "page", | |
| "in": "query", | |
| "description": "Page number", | |
| "schema": {"type": "integer", "minimum": 1} | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "description": "Number of items per page", | |
| "schema": {"type": "integer", "minimum": 1} | |
| }, | |
| { | |
| "name": "name", | |
| "in": "query", | |
| "description": "Character name", | |
| "schema": {"type": "string"} | |
| }, | |
| { | |
| "name": "gender", | |
| "in": "query", | |
| "description": "Character gender", | |
| "schema": { | |
| "type": "string", | |
| "enum": ["Male", "Female", "Other", "Unknown"] | |
| } | |
| }, | |
| { | |
| "name": "race", | |
| "in": "query", | |
| "description": "Character race", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "Saiyan", | |
| "Namekian", | |
| "Human", | |
| "Majin", | |
| "Frieza Race", | |
| "Jiren Race", | |
| "Android", | |
| "God", | |
| "Angel", | |
| "Evil", | |
| "Unknown", | |
| "Nucleico benigno", | |
| "Nucleico" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "affiliation", | |
| "in": "query", | |
| "description": "Character affiliation", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "Z Fighter", | |
| "Red Ribbon Army", | |
| "Namekian Warrior", | |
| "Freelancer", | |
| "Army of Frieza", | |
| "Other", | |
| "Pride Troopers", | |
| "Assistant of Vermoud", | |
| "Assistant of Beerus", | |
| "Villain" | |
| ] | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": {"description": "List of characters"}, | |
| "400": {"description": "Bad Request"}, | |
| "500": {"description": "Internal Server Error"}, | |
| "502": {"description": "Bad Gateway"} | |
| } | |
| } | |
| }, | |
| "/characters/{id}": { | |
| "get": { | |
| "summary": "Get a character by ID", | |
| "operationId": "get_character_by_id", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": True, | |
| "description": "Character ID", | |
| "schema": {"type": "integer"} | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "One character with origin planet and transformations" | |
| }, | |
| "400": {"description": "Bad Request"}, | |
| "500": {"description": "Internal Server Error"} | |
| } | |
| } | |
| }, | |
| "/planets": { | |
| "get": { | |
| "summary": "Get all Dragon Ball planets", | |
| "operationId": "get_planets", | |
| "parameters": [ | |
| { | |
| "name": "page", | |
| "in": "query", | |
| "description": "Page number", | |
| "schema": {"type": "integer", "minimum": 1} | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "description": "Number of items per page", | |
| "schema": {"type": "integer", "minimum": 1} | |
| }, | |
| { | |
| "name": "name", | |
| "in": "query", | |
| "description": "Planet name", | |
| "schema": {"type": "string"} | |
| }, | |
| { | |
| "name": "isDestroyed", | |
| "in": "query", | |
| "description": "Planet destroyed status", | |
| "schema": {"type": "boolean"} | |
| } | |
| ], | |
| "responses": { | |
| "200": {"description": "List of planets"}, | |
| "400": {"description": "Bad Request"}, | |
| "500": {"description": "Internal Server Error"}, | |
| "502": {"description": "Bad Gateway"} | |
| } | |
| } | |
| }, | |
| "/planets/{id}": { | |
| "get": { | |
| "summary": "Get a planet by ID", | |
| "operationId": "get_planet_by_id", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": True, | |
| "description": "Planet ID", | |
| "schema": {"type": "integer"} | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "One planet with all characters that came from it" | |
| }, | |
| "400": {"description": "Bad Request"}, | |
| "500": {"description": "Internal Server Error"} | |
| } | |
| } | |
| }, | |
| "/transformations": { | |
| "get": { | |
| "summary": "Get all character transformations", | |
| "operationId": "get_transformations", | |
| "responses": { | |
| "200": {"description": "List of characters transformations"}, | |
| "400": {"description": "Bad Request"}, | |
| "500": {"description": "Internal Server Error"}, | |
| "502": {"description": "Bad Gateway"} | |
| } | |
| } | |
| }, | |
| "/transformations/{id}": { | |
| "get": { | |
| "summary": "Get a transformation by ID", | |
| "operationId": "get_transformation_by_id", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": True, | |
| "description": "Transformation ID", | |
| "schema": {"type": "integer"} | |
| } | |
| ], | |
| "responses": { | |
| "200": {"description": "One character transformation"}, | |
| "400": {"description": "Bad Request"}, | |
| "500": {"description": "Internal Server Error"} | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment