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

Venkat Muthu 1 Reputation point
2021-10-21T21:38:21.187+00:00

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
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,792 Reputation points Moderator
    2021-11-04T22:55:17.533+00:00

    Hello @Venkat Muthu

    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.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.