graphql-engine/server/tests-py/queries/openapi/openapi_get_endpoint_test_simple.yaml
Puru Gupta 8b60122b9e [server] add openapi support
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1935
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: pranshi06 <85474619+pranshi06@users.noreply.github.com>
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
GitOrigin-RevId: 3e43b84d4e9e181b405855704112b49467dafdf9
2021-10-06 07:16:13 +00:00

59 lines
1.3 KiB
YAML

- description: Try to add a GET rest endpoint with no argument
url: /v1/query
status: 200
response:
message: success
query:
type: create_rest_endpoint
args:
url: simple
name: simple
methods:
- GET
definition:
query:
collection_name: test_collection
query_name: simple_query
- description: Call openapi json endpoint
url: /api/swagger/json
method: GET
status: 200
query:
response:
openapi: 3.0.0
info:
version: ''
title: Rest Endpoints
description: These OpenAPI specifications are automatically generated by Hasura.
paths:
/api/rest/simple:
get:
summary: simple
description: |-
***
The GraphQl query for this endpoint is:
``` graphql
query { test_table { first_name last_name } }
```
responses: {}
parameters:
- schema:
type: string
in: header
name: x-hasura-admin-secret
description: >-
Your x-hasura-admin-secret will be used for authentication of the API
request.
components: {}
- description: Try to remove the endpoint
url: /v1/query
status: 200
response:
message: success
query:
type: drop_rest_endpoint
args:
name: simple