-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Messages elements are not generated #1574
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
@magicmatatjahu @jonaslagoni @kennethaasan ask for comments |
@Tenischev yep Modelina only generate payloads right now. What would you like the class for the message object to contain? Can you give an expected input with expected output? |
@jonaslagoni Message Object contain a lot of information. First of all it's turnOnOff:
name: turnOnOff
title: Turn on/off
summary: Command a particular streetlight to turn the lights on or off.
schemaFormat: application/json
headers:
type: object
properties:
correlationId:
description: Correlation ID set by application
type: string
applicationInstanceId:
description: Unique identifier for a given instance of the publishing application
type: string
payload:
$ref: "#/components/schemas/turnOnOffPayload" Example Java out with Map for headers: /**
* Turn on/off
* Command a particular streetlight to turn the lights on or off
*/
public class TurnOnOff {
public static final String SCHEMA_FORMAT = "application/json";
private TurnOnOffPayload payload;
private Map<String, String> headers;
// getter, hashCode, equals, toString here
} |
Having somewhat similar issue but with Would be amazing if all schemas which are present in |
Describe the bug
Modelina generates only
components.schemas
elements, thecomponents.messages
elements are not generated.Issue found during exploration of possibility to use Modelina for model generation in Java spring template, see #asyncapi/java-spring-template/pull/342
Issue is valid for both
JavaFileGenerator
andJavaGenerator
generators.How to Reproduce
LightMeasuredPayload
,TurnOnOffPayload
,AnonymousSchema_2
which are corresponds tocomponents.schemas
elements and Enum element, thelightMeasured
andturnOnOff
fromcomponents.messages
are not generated.Expected behavior
lightMeasured
andturnOnOff
fromcomponents.messages
are generated bygenerateToFiles
orgenerate
function ofJavaFileGenerator
andJavaGenerator
.The text was updated successfully, but these errors were encountered: