| { |
| "responses": { |
| "200": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "properties": { |
| "columns": { |
| "description": "A list of columns and their metadata", |
| "items": { |
| "properties": { |
| "duplicates_constraint": { "type": "string" }, |
| "keys": { |
| "description": "", |
| "items": { "type": "string" }, |
| "type": "array" |
| }, |
| "longType": { |
| "description": "The actual backend long type for the column", |
| "type": "string" |
| }, |
| "name": { |
| "description": "The column name", |
| "type": "string" |
| }, |
| "type": { |
| "description": "The column type", |
| "type": "string" |
| } |
| }, |
| "type": "object", |
| "title": "TableMetadataColumnsResponse" |
| }, |
| "type": "array" |
| }, |
| "foreignKeys": { |
| "description": "A list of foreign keys and their metadata", |
| "items": { |
| "properties": { |
| "column_names": { |
| "items": { |
| "description": "A list of column names that compose the foreign key or index", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "name": { |
| "description": "The name of the foreign key or index", |
| "type": "string" |
| }, |
| "options": { |
| "properties": { |
| "deferrable": { "type": "boolean" }, |
| "initially": { "type": "boolean" }, |
| "match": { "type": "boolean" }, |
| "ondelete": { "type": "boolean" }, |
| "onupdate": { "type": "boolean" } |
| }, |
| "type": "object", |
| "title": "TableMetadataOptionsResponse" |
| }, |
| "referred_columns": { |
| "items": { "type": "string" }, |
| "type": "array" |
| }, |
| "referred_schema": { "type": "string" }, |
| "referred_table": { "type": "string" }, |
| "type": { "type": "string" } |
| }, |
| "type": "object", |
| "title": "TableMetadataForeignKeysIndexesResponse" |
| }, |
| "type": "array" |
| }, |
| "indexes": { |
| "description": "A list of indexes and their metadata", |
| "items": { |
| "properties": { |
| "column_names": { |
| "items": { |
| "description": "A list of column names that compose the foreign key or index", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "name": { |
| "description": "The name of the foreign key or index", |
| "type": "string" |
| }, |
| "options": { |
| "properties": { |
| "deferrable": { "type": "boolean" }, |
| "initially": { "type": "boolean" }, |
| "match": { "type": "boolean" }, |
| "ondelete": { "type": "boolean" }, |
| "onupdate": { "type": "boolean" } |
| }, |
| "type": "object", |
| "title": "TableMetadataOptionsResponse" |
| }, |
| "referred_columns": { |
| "items": { "type": "string" }, |
| "type": "array" |
| }, |
| "referred_schema": { "type": "string" }, |
| "referred_table": { "type": "string" }, |
| "type": { "type": "string" } |
| }, |
| "type": "object", |
| "title": "TableMetadataForeignKeysIndexesResponse" |
| }, |
| "type": "array" |
| }, |
| "name": { |
| "description": "The name of the table", |
| "type": "string" |
| }, |
| "primaryKey": { |
| "allOf": [ |
| { |
| "properties": { |
| "column_names": { |
| "items": { |
| "description": "A list of column names that compose the primary key", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "name": { |
| "description": "The primary key index name", |
| "type": "string" |
| }, |
| "type": { "type": "string" } |
| }, |
| "type": "object", |
| "title": "TableMetadataPrimaryKeyResponse" |
| } |
| ], |
| "description": "Primary keys metadata" |
| }, |
| "selectStar": { |
| "description": "SQL select star", |
| "type": "string" |
| } |
| }, |
| "type": "object", |
| "title": "TableMetadataResponseSchema" |
| }, |
| "example": { |
| "columns": [], |
| "foreignKeys": [], |
| "indexes": [], |
| "name": "string", |
| "primaryKey": {}, |
| "selectStar": "string" |
| } |
| } |
| }, |
| "description": "Table metadata information" |
| }, |
| "400": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "properties": { "message": { "type": "string" } }, |
| "type": "object" |
| }, |
| "example": { "message": "Bad request: Invalid parameters provided" } |
| } |
| }, |
| "description": "Bad request" |
| }, |
| "401": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "properties": { "message": { "type": "string" } }, |
| "type": "object" |
| }, |
| "example": { "message": "Unauthorized: Authentication required" } |
| } |
| }, |
| "description": "Unauthorized" |
| }, |
| "404": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "properties": { "message": { "type": "string" } }, |
| "type": "object" |
| }, |
| "example": { |
| "message": "Not found: The requested resource does not exist" |
| } |
| } |
| }, |
| "description": "Not found" |
| }, |
| "422": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "properties": { "message": { "type": "string" } }, |
| "type": "object" |
| }, |
| "example": { "message": "Unprocessable entity: Validation error" } |
| } |
| }, |
| "description": "Could not process entity" |
| }, |
| "500": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "properties": { "message": { "type": "string" } }, |
| "type": "object" |
| }, |
| "example": { |
| "message": "Internal server error: An unexpected error occurred" |
| } |
| } |
| }, |
| "description": "Fatal error" |
| } |
| } |
| } |