Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Analytics 2.0 API - Invalid Swagger Doc?

james-ssc
Level 2
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
2 Replies
james-ssc
Level 2
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?

josejr19
Level 6
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.