-
-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Why do we need this improvement?
Asyncapi.yml:
asyncapi: '2.2.0'
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
user/signedup:
subscribe:
message:
$ref: '#/components/messages/UserSignedUp'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
displayName:
type: string
description: Name of the user
email:
type: string
format: email
description: Email of the user
Output:
asyncapi generate models java ./asyncapi.yml --packageName=src
Successfully generated the following models:
## Model name: AnonymousSchema_1 // Name should be change to userSignedUp
package src;
import java.util.Map;
public class AnonymousSchema_1 {
private String displayName;
private String email;
private Map<String, Object> additionalProperties;
public String getDisplayName() { return this.displayName; }
public void setDisplayName(String displayName) { this.displayName = displayName; }
public String getEmail() { return this.email; }
public void setEmail(String email) { this.email = email; }
public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; }
public void setAdditionalProperties(Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; }
}
How will this change help?
This change will help to adhere proper naming of the project, lets suppose if we want to call the model class we need to call the AnonymousSchema_1 which seems to be not valid.
Screenshots
No response
How could it be implemented/designed?
- Use the name of the message as the class name
🚧 Breaking changes
No
👀 Have you checked for similar open issues?
- I checked and didn't find a similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue?
Yes I am willing to submit a PR!
black-snow, DieDrachenfaenger, gnuletik, lah-wag, williamrjribeiro and 2 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request