Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@asyncapi/java-spring-cloud-stream-template

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/java-spring-cloud-stream-template - npm Package Compare versions

Comparing version
0.12.0
to
0.12.1
+42
test/mocks/avro-union-object.yaml
---
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