You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I tried to generate avro mapping java classes with spring template but in any way the generator is making json mapping java classes ( with @JsonProperty property ) .
asyncapi: '2.6.0'
info:
title: Mercadona Kafka API
version: 1.0.0
description: |-
Api acerca de las entidades en Mercadona.
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
defaultContentType: 'application/vnd.apache.avro+json;version=1.9.0'
servers:
production:
url: broker:9092
description: Kafka PRODUCTION cluster
protocol: kafka
channels:
mytopic:
description: The topic.
publish:
summary: publish message.
operationId: publishStoreassortmentvisibility
message:
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
$ref: '#/components/messages/storeassortmentvisibility'
subscribe:
summary: receive message.
operationId: receiveStoreassortmentvisibility
message:
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
$ref: '#/components/messages/storeassortmentvisibility'
components:
messages:
storeassortmentvisibility:
name: storeassortmentvisibility
title: storeassortmentvisibility measured
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
payload:
type: record
name: User
namespace: com.company
doc: User information
fields:
- name: displayName
type: string
- name: email
type: string
- name: age
type: int
package com.asyncapi.model;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import javax.annotation.processing.Generated;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* User information
*/
@Generated(value="com.asyncapi.generator.template.spring", date="2024-10-27T11:32:20.876Z")
public class ComCompanyUser {
private @Valid String displayName;
private @Valid String email;
private @Valid int age;
@JsonProperty("displayName")@NotNull
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
@JsonProperty("email")@NotNull
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
. . .
Expected behavior
Expected to see generated java avro mapping files , example :
@org.apache.avro.specific.AvroGenerated
public class User extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord
. . .
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. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Describe the bug.
Hello,
I tried to generate avro mapping java classes with spring template but in any way the generator is making json mapping java classes ( with @JsonProperty property ) .
the command is :
the generated file is:
Expected behavior
Expected to see generated java avro mapping files , example :
Screenshots
none
How to Reproduce
🥦 Browser
Microsoft Edge
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
The text was updated successfully, but these errors were encountered: