@asyncapi/java-spring-cloud-stream-template
Advanced tools
| --- | ||
| components: | ||
| schemas: {} | ||
| messages: | ||
| JobOrder: | ||
| payload: | ||
| name: "JobOrder" | ||
| namespace: "com.example.api.jobOrder" | ||
| doc: "JobOrder" | ||
| type: "record" | ||
| fields: | ||
| - name: "jobOrderId" | ||
| doc: "JobOrderID" | ||
| type: "string" | ||
| - name: "jobOrderDescription" | ||
| doc: "JobOrderDescription" | ||
| type: | ||
| - "null" | ||
| - "string" | ||
| - name: "jobOrderLongDescription" | ||
| doc: "JobOrderLongDescription" | ||
| type: | ||
| - "null" | ||
| - "string" | ||
| schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" | ||
| contentType: "application/vnd.apache.avro+json" | ||
| servers: | ||
| production: | ||
| protocol: "kafka" | ||
| url: "xxxxx.us-east-2.aws.confluent.cloud:9092" | ||
| channels: | ||
| test.jobs.order: | ||
| subscribe: | ||
| message: | ||
| $ref: "#/components/messages/JobOrder" | ||
| asyncapi: "2.0.0" | ||
| info: | ||
| x-generated-time: "2022-02-24 01:18 UTC" | ||
| description: "" | ||
| title: "Union Types" | ||
| x-view: "provider" | ||
| version: "1" |
+3
-0
@@ -339,2 +339,5 @@ const filter = module.exports; | ||
| typeName = _.upperFirst(javaName); | ||
| } else if (property.oneOf() || property.anyOf() || property.allOf()) { | ||
| // Picking a type for the user may be difficult - especially since the first avro union value must be the default value which is normally of type null. | ||
| typeName = 'Object'; | ||
| } else { | ||
@@ -341,0 +344,0 @@ // check to see if it's a ref to another schema. |
+1
-1
| { | ||
| "name": "@asyncapi/java-spring-cloud-stream-template", | ||
| "version": "0.12.0", | ||
| "version": "0.12.1", | ||
| "description": "Java Spring Cloud Stream template for AsyncAPI generator.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -186,2 +186,11 @@ const path = require('path'); | ||
| }); | ||
| it('should return object when avro union type is used specifying many possible types', async () => { | ||
| await generate('mocks/avro-union-object.yaml'); | ||
| const validatedFiles = [ | ||
| 'src/main/java/com/example/api/jobOrder/JobOrder.java' | ||
| ]; | ||
| await assertExpectedFiles(validatedFiles); | ||
| }); | ||
| }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
223395
1.5%54
1.89%1765
0.57%