Code Monkey home page Code Monkey logo

Comments (5)

babyfish-ct avatar babyfish-ct commented on June 12, 2024

Cannot reproduce.

Example(dev branch): https://github.com/babyfish-ct/jimmer/blob/dev/project/jimmer-sql-kotlin/src/test/dto/User.dto

export org.babyfish.jimmer.sql.kt.model.filter.User
    -> package org.babyfish.jimmer.sql.kt.model.dto

import testpkg.annotations.Module

@Module(["a", "b", "c"])
UserView {
    #allScalars
    files {
        #allScalars
        childFiles*
    }
}

The generated code is

@GeneratedBy(file = "<jimmer-sql-kotlin>/src/test/dto/User.dto")
@Module(
    `value` = [
        "a", 
        "b", 
        "c"
    ]
)
public open class UserView(
    @JsonProperty(required = true)
    public var id: Long,
    @JsonProperty(required = true)
    public var name: String,
    public var deletedTime: LocalDateTime? = null,
    @JsonProperty(required = true)
    public var files: List<TargetOf_files> = emptyList(),
) : View<User> {
    ...omit...
}

from jimmer.

belovaf avatar belovaf commented on June 12, 2024

The problem is that annotation is not copied from entity. For example:

@Entity
@Schema(title="The Book")
interface Book {
... 
}

and dto:

BookView {
 name
} 

I expect, that generated BookView class will be annotated with @Schema.

from jimmer.

babyfish-ct avatar babyfish-ct commented on June 12, 2024

which library? swagger-v3?, springdoc?

from jimmer.

belovaf avatar belovaf commented on June 12, 2024

Actually, any of them. Even custom user annotation is not copied:

annotation class MyAnno

@Entity
@MyAnno
interface Book {
}

and dto:

BookView {
...
}

from jimmer.

babyfish-ct avatar babyfish-ct commented on June 12, 2024

Try 0.8.112 please

from jimmer.

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.