question

vmcode avatar image
0 Votes"
vmcode asked MikeUrnun edited

Azure APIM - Root level API tags are not mapped to the API

Hi,

I'm trying to add tags to the API in APIM from OpenAPI spec but that is being ignored. I can manually add tags under Settings->Tag but I would like to do it from the OpenAPI spec to avoid manual configuration. The same works at the operation level. Any idea if that works?

Sample Spec:

openapi: 3.0.0
info:
title: Simple API overview
version: 2.0.0
tags:
- name: System API
description: API Type
- name: Domain
description: Domain
paths:
/v1:
get:
operationId: listVersionsv2
summary: Show V1 API version details
security:
- OAuth2:
- read:listversion
tags:
- ListVersion1

azure-api-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MikeUrnun avatar image
0 Votes"
MikeUrnun answered MikeUrnun edited

Hello @vmcode

According to OpenAPI spec, the Tags object is used to list all of the tags that can be used and applied at the Operation level so the spec itself doesn't seem to define tags for the root API level.

That part is also mentioned in the announcement blog post for the Tagging feature of the APIM:

...When exporting, only tags that are set on operations will be part of the specification, as tags on the API are not supported by the standard.

I hope this is helpful, feel free to tag me and let me know if you have further questions.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.