openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG] [JAVA] Client names not generated from spec

Open dychri03 opened this issue 1 year ago • 0 comments

Bug Report Checklist

  • [x] Have you provided a full/minimal spec to reproduce the issue?
  • [x] Have you validated the input using an OpenAPI validator (example)?
  • [ ] Have you tested with the latest master to confirm the issue still exists?
  • [x] Have you searched for related issues/PRs?
  • [x] What's the actual output vs expected output?
  • [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When generating API clients, the name field is no longer injected from tags. resulting in the API name being the placeholder value.

openapi-generator version

v7.9.0

OpenAPI declaration file content or url
openapi: 3.0.1
info:
  title: test-microservice
servers:
  - url: https://testms.org/
tags:
  - name: test-ms-controller
    description: Test MS Controller
paths:
  /api/v1/test:
    get: ...
Generation Details

Generated via openapi-swagger-maven-plugin, using Spring generator with Spring Cloud library. Spring Boot 3 enabled.

Steps to reproduce

Generate any API Client with the described setup. Within the spec, set the tags.name field to the desired API client name. In the generated client code the FeignClient annotation name field should be set to the tag.name value. However, now just holds the default API value. Rolling back to any v6.X.X will produce the desired outcome.

Current output: @FeignClient(name="${api.name:api}", url="${api.url:https://testms.org}", configuration = ClientConfiguration.class) Expected output: @FeignClient(name="${testMsController.name:testMsController}", url="${api.url:https://ms-eg-prospect-transform-q.apps.pcfnp.fnni.com}", configuration = ClientConfiguration.class)

dychri03 avatar Oct 11 '24 14:10 dychri03