graphql-engine/server/tests-py/queries/openapi/openapi_get_endpoint_test_simple.yaml
David Overton 63291f6de8 fix OpenAPI for mutiple methods on same REST endpoint path
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2603
GitOrigin-RevId: 32b3133f0bb1a9bf50e4db492bab1eabf5a9430c
2021-10-14 10:32:18 +00:00

60 lines
1.4 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