Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Analytics 2.0 API - Invalid Swagger Doc?

Avatar

Level 2

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_getCalculatedMe...https://adobedocs.github.io/analytics-2.0-apis/#/calculatedmetrics/calculatedmetrics_getCalculatedMe...

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
1 Accepted Solution

Avatar

Correct answer by
Level 6

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.

View solution in original post

2 Replies

Avatar

Level 2

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?

Avatar

Correct answer by
Level 6

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.