OpenAPITools / OpenAPITools/openapi-generator

[REQ] Custom Pattern Message for kotlin-spring

Open
#16,958 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

The current version of kotlin-spring [server] generator seems to be not supporting vendor extension like spring [server] generator does, such as x-pattern-message for custom message for pattern validation. I have added x-pattern-message on one of my model's property to specify the custom message. The custom message is added using spring generator, but not with kotlin-spring.

Example model:
CleanShot 2023-11-01 at 16 29 40@2x

Generated with spring generator:
CleanShot 2023-11-01 at 16 27 27@2x

Generated with kotlin-spring generator:
CleanShot 2023-11-01 at 16 31 08@2x

Describe the solution you'd like

Would like kotlin-spring generator to support VendorExtension just like spring generator does.

Describe alternatives you've considered

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the existing spring server generator's handling of the x-pattern-message vendor extension with the kotlin-spring generator. Start by locating the corresponding generator templates or validation handling, then reproduce the issue with the example model. Done means kotlin-spring emits the custom pattern-validation message in the generated model, with coverage matching the spring behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, spring
Domain
api, backend, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.