Analytics 2.0 API - Invalid Swagger Doc? | Community
Skip to main content
james-ssc
Level 2
September 26, 2019
Solved

Analytics 2.0 API - Invalid Swagger Doc?

  • September 26, 2019
  • 2 replies
  • 2738 views

I still have an issue where the Swagger document for Analytics API 2.0 seems to be invalid, with a number of broken references.

The errors are visible within the Swagger UI if you go to one of the affected endpoints. Here is an example:

https://adobedocs.github.io/analytics-2.0-apis/#/calculatedmetrics/calculatedmetrics_getCalculatedMetricFunctionshttps://adobedocs.github.io/analytics-2.0-apis/#/calculatedmetrics/calculatedmetrics_getCalculatedMetricFunctions

For a full list, you can paste the full Swagger doc (https://adobedocs.github.io/analytics-2.0-apis/swagger.json) into the online Swagger editor (https://editor.swagger.io). This shows 7 errors total at the time of writing (see below)

For me this means I'm unable to generate a client for the 2.0 API. Maybe I'm missing something? Do most people still use 1.4?

Many thanks,

James

N.b. I had a related question which I closed by mistake: Definitions seem to be missing from API 2.0 Swagger

Errors reported by editor.swagger.io:

Semantic error at paths./calculatedmetrics/functions.get.responses.200.schema.items.$ref

$refs must reference a valid location in the document

Semantic error at paths./calculatedmetrics/functions/{id}.get.responses.200.schema.$ref

$refs must reference a valid location in the document

Semantic error at paths./calculatedmetrics/{id}.delete.responses.200.schema.$ref

$refs must reference a valid location in the document

Semantic error at paths./dimensions.get.parameters.4.default

Default values must be present in `enum`

Semantic error at paths./users.get.operationId

Operations must have unique operationIds.

Structural error at definitions.Owner.properties.name

should NOT have additional properties additionalProperty: position

Structural error at definitions.Owner.properties.login

should NOT have additional properties additionalProperty: position
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by josejr19

If you are looking for the correct swagger schema please let me know, I was able to fix the issue after downloading the swagger json and reformatting.

2 replies

james-ssc
james-sscAuthor
Level 2
October 2, 2019

Can anyone advise?

It would be good to know if this isn't likely to be fixed soon - is the advice to use the 1.4 API? Or is the 2.0 API reliable enough to call if I write my own client code instead of using the Swagger definitions?

josejr19Accepted solution
Level 5
July 27, 2020

If you are looking for the correct swagger schema please let me know, I was able to fix the issue after downloading the swagger json and reformatting.