graphql-engine/server/tests-py/queries/endpoints/endpoint_duplicate_param.yaml
paritosh-08 b75706dd12 server: validate REST endpoint queries after metadata change
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2338
Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
GitOrigin-RevId: 9cd6bb940ba74fe41bdf2db3c4f35e89c4fb0577
2022-02-08 04:47:52 +00:00

33 lines
820 B
YAML

description: Try to add an endpoint with duplicate params
url: /v1/query
status: 400
response:
internal:
- definition:
definition:
query:
collection_name: test_collection
query_name: simple_query
url: foo/:id/bar/:id
methods:
- GET
name: duplicate
comment:
reason: "Duplicate variables found in endpoint path: foo/:id/bar/:id"
name: rest_endpoint duplicate
type: rest_endpoint
path: $.args
error: 'Duplicate variables found in endpoint path: foo/:id/bar/:id'
code: invalid-configuration
query:
type: create_rest_endpoint
args:
url: "foo/:id/bar/:id"
name: duplicate
methods:
- GET
definition:
query:
collection_name: test_collection
query_name: simple_query