swagger-api / swagger-api/swagger-codegen

<Java> Code generation Skips the property with Type 'Class'

Open
#8,484 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I have a Serializable Java class with three properties of type 1) String 2) List and 3) Class. Generated Java Code Skips the property with Type 'Class'.

Swagger-codegen version

2.2.2

Swagger declaration file content or url

-->

Command line used for generation

Eclipse maven plugin
Swagger-codegen-maven-plugin version : 2.2.2

Steps to reproduce
  1. add Class<?> as property in any of the Java serialization Object used in REST service

  2. generate Java client code using Maven plugin for swagger codegen

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

Start with the Swagger-codegen Maven plugin generation path and create a minimal Swagger declaration reproducing a serializable Java model with String, List and Class properties. Confirm whether the generated Java client omits only the Class<?> property; done means that property is represented while the other properties remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.