From 63e0035e4eb1518ee9dcd2a2c118867f13abfd12 Mon Sep 17 00:00:00 2001 From: dsinghvi Date: Fri, 11 Oct 2024 10:59:11 -0400 Subject: [PATCH] fix: support different query parameter encoding --- .../apis/fdr/definition/api/latest/endpoint.yml | 17 ++++++++++++++++- .../fdr/definition/api/v1/read/endpoint.yml | 6 ++++++ .../fdr/definition/api/v1/register/endpoint.yml | 6 ++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/fern/apis/fdr/definition/api/latest/endpoint.yml b/fern/apis/fdr/definition/api/latest/endpoint.yml index 685923dd4c..06c86e4ccf 100644 --- a/fern/apis/fdr/definition/api/latest/endpoint.yml +++ b/fern/apis/fdr/definition/api/latest/endpoint.yml @@ -28,7 +28,7 @@ types: defaultEnvironment: optional environments: optional> pathParameters: optional> - queryParameters: optional> + queryParameters: optional> requestHeaders: optional> responseHeaders: optional> # this is not being used currently request: optional @@ -37,6 +37,21 @@ types: examples: optional> snippetTemplates: optional + QueryParameter: + union: + commaSeparated: + type: type.ObjectProperty + docs: An array of query parameters that are serialized as a comma delimited list + exploded: + type: type.ObjectProperty + docs: An array of query parameters that are sent as individual params in the URL + deepObject: + type: type.ObjectProperty + docs: A query parameter that is an object with properties and serialized as `a[key1]=value1` + basic: + type: type.ObjectProperty + docs: A basic primitive query parameter + EndpointSnippetTemplates: properties: typescript: optional diff --git a/fern/apis/fdr/definition/api/v1/read/endpoint.yml b/fern/apis/fdr/definition/api/v1/read/endpoint.yml index 278794785b..3c7571fc66 100644 --- a/fern/apis/fdr/definition/api/v1/read/endpoint.yml +++ b/fern/apis/fdr/definition/api/v1/read/endpoint.yml @@ -65,6 +65,12 @@ types: properties: key: string type: type.TypeReference + arrayEncoding: optional + + QueryParameterArrayEncoding: + enum: + - comma + - exploded Header: extends: diff --git a/fern/apis/fdr/definition/api/v1/register/endpoint.yml b/fern/apis/fdr/definition/api/v1/register/endpoint.yml index b8fa085e69..f8ca0ee1bc 100644 --- a/fern/apis/fdr/definition/api/v1/register/endpoint.yml +++ b/fern/apis/fdr/definition/api/v1/register/endpoint.yml @@ -61,6 +61,12 @@ types: properties: key: string type: type.TypeReference + arrayEncoding: optional + + QueryParameterArrayEncoding: + enum: + - comma + - exploded Header: extends: