hasura / hasura/graphql-engine

The OpenAPI Exported by Remote GraphQL need title or description

Open
#9,891 0 comments 0 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

I use endpoint '/api/swagger/json' to get restful api doc, the api is based on my graphql server.
But whatever request or response, many field has no title or description.
eg:
only top level properties `aiLabMutation` has meaningful title and description, the title in second level is pointless, the description in second level is gone.
```json
{
"AiInfiniteZoomCreateInput!": {
"nullable": false,
"properties": {
"cfg": {
"nullable": false,
"title": "Float",
"type": "number"
},
"creativity": {
"nullable": false,
"title": "Float",
"type": "number"
}
},
"title": "AiInfiniteZoomCreateInput",
"type": "object"
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"aiLabMutation": {
"description": "AI lab",
"nullable": true,
"properties": {
"__typename": {
"nullable": false,
"title": "String",
"type": "string"
},
"infiniteZoomCreate": {
"items": {
"$ref": "#/components/schemas/Long"
},
"nullable": false,
"type": "array"
}
},
"title": "AiLabMutation",
"type": "object"
}
}
}
}
},
"description": "Responses for POST /api/rest/ai/lab/createInfiniteZoom"
}
}
}
```

### Describe the solution you'd like

I need all field's description.
The graphql schema really has it, and we can convert them to api doc.

### Describe alternatives you've considered

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.