Hi,
I’ve been working on an action integration to allow me to work with the Azure DevOps APIs. Most actions work, however any action that requires the application/json-patch+json Content-Type is failing.
Expected Result:
The user story should be created successfully without any content type errors.
Actual Result:
The request fails with a VssRequestContentTypeNotSupportedException. The error message returned is:
“The request indicated a Content-Type of ‘application/json’ for method type ‘POST’ which is not supported. Valid content types for this method are: application/json-patch+json.” The GPT recognises the error, and tries again, but always fails. Here is my OpenAPI spec:
paths:
/xxxxxxxxx/_apis/wit/workitems/$user story:
patch:
summary: Create a new user story
operationId: createUserStory
parameters:
- name: api-version
in: query
description: The version of the API to use
required: true
schema:
type: string
enum: [“7.1-preview.3”]
requestBody:
description: The user story to create
required: true
content:
application/json-patch+json:
schema:
type: array
items:
$ref: “#/components/schemas/WorkItemPatchOperation”
responses:
“200”:
description: Successful response
content:
application/json:
schema:
$ref: “#/components/schemas/WorkItem”
Any ideas? I’ve tried adding clear instructions to the GPT but that’s not worked either.