Skip to content

Actuator endpoints have 2 appended to operationId #1421

Closed
@ddulaney

Description

@ddulaney

Describe the bug

When using Spring Boot Actuator, Springdoc includes the endpoints in the spec (🎉), but the operationIds are a little odd:

  /meta/health:
    get:
      tags:
        - Actuator
      summary: Actuator web endpoint 'health'
      operationId: health_2

  /meta/info:
    get:
      tags:
        - Actuator
      summary: Actuator web endpoint 'info'
      operationId: info_2

To Reproduce
Here's the relevant portion of my application.yml:

# OpenAPI
springdoc:
  # Include actuator endpoints
  show-actuator: true
  # Redirect from root to Swagger UI
  swagger-ui.use-root-path: true
  version: ${BUILD_VERSION:unset}
  default-produces-media-type: application/json
  # Exclude the k8s probes because they don't generate properly and shouldn't be used by clients anyway
  paths-to-exclude: "/meta/health/*"

# Expose some actuator endpoints over REST
management:
  endpoint:
    # Enable info & health
    info.enabled: true
    health.enabled: true
  endpoints:
    # Disable other endpoints
    enabled-by-default: false
    # Don't expose anything over JMX
    jmx.exposure.exclude: "*"
    web:
      exposure.include: "*"
      # Disable the actuator root discovery endpoint
      discovery.enabled: false
      # Customize path mappings
      base-path: /meta

Expected behavior
I would expect the operationIds to be health and info.

Additional context
Somewhat related to #1264

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions