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
Something went wrong:
Template render error: (node_modules@asyncapi\generator\node_modules@asyncapi\java-spring-cloud-stream-template\template\src\main\java$$everySchema$$.java) [Line 10, Column 51]
Error: Can't determine the type of property petType
at eval (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :46:11)
at node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:510:9
at eval (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :12:11)
at node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:510:9
at Template.root [as rootRenderFunc] (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :367:3)
at Template.getExported (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:508:10)
at eval (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :11:5)
at Environment.getTemplate (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:225:9)
at Template.root [as rootRenderFunc] (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :9:5)
Expected behavior
Code should be generated
Screenshots
How to Reproduce
ag ../polymorphism.yaml @asyncapi/java-spring-cloud-stream-template
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.
asyncapi: 2.6.0info:
title: Example of schema using polymorphismversion: 2.6.0channels:
pet:
subscribe:
message:
payload:
type: objectproperties:
pet:
$ref: "#/components/schemas/Pet"components:
schemas:
Pet:
type: objectdiscriminator: petTypeproperties:
name:
type: stringpetType:
type: stringrequired:
- name
- petType## applies to instances with `petType: "Cat"`## because that is the schema nameCat:
description: A representation of a catallOf:
- $ref: '#/components/schemas/Pet'
- type: objectproperties:
huntingSkill:
type: stringdescription: The measured skill for huntingenum:
- clueless
- lazy
- adventurous
- aggressiverequired:
- huntingSkill## applies to instances with `petType: "Dog"`## because that is the schema nameDog:
description: A representation of a dogallOf:
- $ref: '#/components/schemas/Pet'
- type: objectproperties:
packSize:
type: integerformat: int32description: the size of the pack the dog is fromminimum: 0required:
- packSize## applies to instances with `petType: "StickBug"`## because that is the required value of the discriminator field,## overriding the schema nameStickInsect:
description: A representation of an Australian walking stickallOf:
- $ref: '#/components/schemas/Pet'
- type: objectproperties:
petType:
const: StickBugcolor:
type: stringrequired:
- color
Describe the bug.
Cannot generate code from the spec
Something went wrong:
Template render error: (node_modules@asyncapi\generator\node_modules@asyncapi\java-spring-cloud-stream-template\template\src\main\java$$everySchema$$.java) [Line 10, Column 51]
Error: Can't determine the type of property petType
at eval (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :46:11)
at node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:510:9
at eval (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :12:11)
at node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:510:9
at Template.root [as rootRenderFunc] (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :367:3)
at Template.getExported (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:508:10)
at eval (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :11:5)
at Environment.getTemplate (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:225:9)
at Template.root [as rootRenderFunc] (eval at _compile (node_modules@asyncapi\generator\node_modules\nunjucks\src\environment.js:527:18), :9:5)
Expected behavior
Code should be generated
Screenshots
How to Reproduce
ag ../polymorphism.yaml @asyncapi/java-spring-cloud-stream-template
🥦 Browser
None
👀 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: