Closed thim81 closed 4 months ago
Linked to #801
Currently the request body used for creating the Postman request is a fixed content-type mapping, where the following logic applies:
This PR uses the order of the request body content-types as ordered in the OpenAPI spec, meaning which ever is found first will be taken.
Example OpenAPI:
openapi: 3.0.0 info: version: v1 title: 601-RequestBody TcPCM Gateway API description: TcPCM Gateway API license: name: Privacy Policy url: https://www.plm.automation.siemens.com/global/en/legal/privacy-policy.html paths: "/api/v1/administration/samAuth/users/{userName}": put: tags: - "Administration: Users" summary: Create or Update Sam Auth User operationId: CreateSamAuthUser_CreateOrUpdateSamAuthUser parameters: - name: userName in: path description: User name required: true schema: type: string - name: Authorization in: header description: bearer token required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/CreateSamAuthUserRequestModel" text/json: schema: $ref: "#/components/schemas/CreateSamAuthUserRequestModel" application/xml: schema: $ref: "#/components/schemas/CreateSamAuthUserRequestModel" text/xml: schema: $ref: "#/components/schemas/CreateSamAuthUserRequestModel" application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/CreateSamAuthUserRequestModel" description: The request represents that the user with {userName} will either be created or updated depending on whether the {userName} exists or not. required: true responses: "200": description: OK content: application/json: schema: type: object text/json: schema: type: object application/xml: schema: type: object text/xml: schema: type: object
Current result:
PR result:
Closing this in favour of #803
Linked to #801
Currently the request body used for creating the Postman request is a fixed content-type mapping, where the following logic applies:
This PR uses the order of the request body content-types as ordered in the OpenAPI spec, meaning which ever is found first will be taken.
Example OpenAPI:
Current result:
PR result: