From bc11b9e8cf88381a37f850dd14783a37a4b118b0 Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Mon, 22 Jul 2024 14:36:15 +0200 Subject: [PATCH] fix(gn4-api): adjust content-type for records api to XML Also regenerates API client This fixes an error when trying to save a record with GN 4.2.5+ --- .../gn4/src/openapi/api/records.api.service.ts | 6 +----- libs/data-access/gn4/src/spec.yaml | 8 -------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/libs/data-access/gn4/src/openapi/api/records.api.service.ts b/libs/data-access/gn4/src/openapi/api/records.api.service.ts index 6884ce91a7..1867765db7 100644 --- a/libs/data-access/gn4/src/openapi/api/records.api.service.ts +++ b/libs/data-access/gn4/src/openapi/api/records.api.service.ts @@ -7201,11 +7201,7 @@ export class RecordsApiService { } // to determine the Content-Type header - const consumes: string[] = [ - 'application/xml', - 'application/json', - 'application/x-www-form-urlencoded', - ] + const consumes: string[] = ['application/xml'] const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes) if (httpContentTypeSelected !== undefined) { diff --git a/libs/data-access/gn4/src/spec.yaml b/libs/data-access/gn4/src/spec.yaml index ee451ac7a1..bfe1eb0b59 100644 --- a/libs/data-access/gn4/src/spec.yaml +++ b/libs/data-access/gn4/src/spec.yaml @@ -1832,14 +1832,6 @@ paths: schema: type: string description: XML fragment. - application/json: - schema: - type: string - description: XML fragment. - application/x-www-form-urlencoded: - schema: - type: string - description: XML fragment. responses: default: description: default response