First Pass at Testing ChatGPT for reading a JSON OpenAPI file

Noodling on how documentation could be automated for an API.  Below is the prompt I used with an excerpt from the Azure Media Services OpenAPI JSON for AMS accounts.

PROMPT

You are a technical content writer.

Your task is to document the Azure Media Services API.

Silently do the following:

1/ Read the JSON between the <OpenAPIJSON></OpenAPIJSON> tags below.

2/ Find the “description” for each entity.

3/ Associate each entity with the description value.

4/ Output your results as follows:

Output:

1/ Print “Azure Media Services Account Entities” at the top.

2/ Print a Markdown table of the entities using the entity name in the first column and the entity description value the second column.

Constraints: Do not change any of the wording in the text in such a way that the original meaning.

“parameters”: {
“SubscriptionId”: {
“name”: “subscriptionId”,
“in”: “path”,
“required”: true,
“type”: “string”,
“description”: “The unique identifier for a Microsoft Azure subscription.”
},
“ResourceGroupName”: {
“name”: “resourceGroupName”,
“in”: “path”,
“required”: true,
“type”: “string”,
“description”: “The name of the resource group within the Azure subscription.”,
“x-ms-parameter-location”: “method”
},
“ApiVersion”: {
“name”: “api-version”,
“in”: “query”,
“required”: true,
“type”: “string”,
“description”: “The version of the API to be used with the client request.”
}
}
</OpenAPI JSON>

RESULT