Giter VIP home page Giter VIP logo

Comments (4)

timonback avatar timonback commented on June 24, 2024 1

Awesome, Springwolf does support the ModelConverter mechanism. Just create a bean in the spring context (example: MonetaryAmountConverter within the add-ons package)

The class in the linked GH comment has quite high complexity and I am unsure about creating a Springwolf plugin at this point, which will require maintenance.
Adding it to Springwolf raises the expectation that the full implementation is tested and works as expected - including resolving issues.

Still, you can add the class to your project.

I am open to re-consider adding it to springwolf, if more people request it.

from springwolf-core.

timonback avatar timonback commented on June 24, 2024

Hi @ctasada ,

springwolf uses swagger to get the property names.

Even though I use kotlin myself, adding support for one 'external' annotations opens the door to add support for many more annotations.
Besides, iterating through the class hierarchy to identify all annotations and patch the properties names can be tricky.

Multiple alternatives come to mind:

  1. Get support for the @SerialName annotation in swagger itself.
  2. Create some kind of meta-annotation/code-generation/compiler plugin that adds for each @SerialName annotation the swagger @JsonProperty/@Schema annotation.

Do you have a simple solution in mind?

from springwolf-core.

ctasada avatar ctasada commented on June 24, 2024

Agree, I was thinking about maybe something like a Swagger ModelConverter that supports the annotation.

I found this old ticket in SpringDoc which we may use as reference: springdoc/springdoc-openapi#1226

from springwolf-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.