Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming problem with hyphen in items' name for java classes #674

Open
a819694114 opened this issue Feb 28, 2024 · 1 comment
Open

Naming problem with hyphen in items' name for java classes #674

a819694114 opened this issue Feb 28, 2024 · 1 comment
Assignees
Labels
area:server This item is related to the server extension bug Something isn't working pinned Issues and PRs that must not stale

Comments

@a819694114
Copy link

When I use server generation for some classes with List and ArrayList, the class name has a hyphen in it, which is a syntax error for Java class name.
I have some schema as shown below:

"SomeObject": {
  "type": "object"
  "properties": {
    "someList": {
      "type": "array"
      "items": {
        "$ref": "#/components/schemas/Some-Other-Object"
      }
    }
  }
}

The generated code will have something like this:
private List<Some-Other-Object> someList = new ArrayList<>(Some-Other-Object);
This will not compile. To match the naming convention, the code should be like this:
private List<SomeOtherObject> someList = new ArrayList<>(SomeOtherObject);
The file name of the some-other-object is fine. The file name is SomeOtherObject.java

@hbelmiro hbelmiro added the area:server This item is related to the server extension label Feb 29, 2024
@carlesarnal carlesarnal added the bug Something isn't working label Mar 12, 2024
Copy link
Contributor

@ricardozanini @hbelmiro This is being labeled as Stale.

@github-actions github-actions bot added the Stale label May 12, 2024
@hbelmiro hbelmiro added pinned Issues and PRs that must not stale and removed Stale labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:server This item is related to the server extension bug Something isn't working pinned Issues and PRs that must not stale
Projects
None yet
Development

No branches or pull requests

3 participants