Skip to content
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

build: 1.0.0-RC #195

Merged
merged 45 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
682ac15
refactor(schemas): update JSON Schema meta properties
Pakisan Mar 28, 2024
bbcfdbf
refactor(schemas): update JSON Schema Validation Keywords for Any Ins…
Pakisan Mar 28, 2024
1144bd3
refactor(schemas): update JSON Schema Validation Keywords for Numeric…
Pakisan Mar 28, 2024
f6660a9
refactor(schemas): update JSON Schema Validation Keywords for Strings
Pakisan Mar 28, 2024
2753611
refactor(schemas): update JSON Schema Validation Keywords for Arrays
Pakisan Mar 28, 2024
862a4f3
refactor(schemas): update JSON Schema Validation Keywords for Objects
Pakisan Mar 28, 2024
6b3dbbd
refactor(schemas): update JSON Schema Keywords for Applying Subschema…
Pakisan Mar 30, 2024
5c06bb0
refactor(schemas): update JSON Schema String-Encoding Non-JSON Data
Pakisan Mar 30, 2024
d4ed60d
refactor(schemas): update JSON Schema Schema Re-Use With "definitions"
Pakisan Mar 30, 2024
acd1789
refactor(schemas): update JSON Schema Schema Annotations
Pakisan Mar 30, 2024
4f83aab
refactor(schemas): update JSON Schema remove AsyncAPI properties
Pakisan Mar 30, 2024
39c3462
refactor(schemas): update JSON Schema Semantic Validation With "format"
Pakisan Mar 30, 2024
bf4c099
refactor(schemas): update JSON Schema Keywords for Applying Subschema…
Pakisan Mar 30, 2024
b317bba
refactor(schemas): update JSON Schema Semantic Validation With "format"
Pakisan Mar 30, 2024
4cfc67f
refactor(schemas): update JSON Schema String-Encoding Non-JSON Data
Pakisan Mar 30, 2024
3901999
refactor(schemas): JSON Schema Draft 07
Pakisan Mar 30, 2024
09393d8
refactor(schemas): split Schema to Json and AsyncAPI Schemas
Pakisan Mar 30, 2024
30f86e1
fix(json-schema): defaultValue, properties, constValue now can have a…
Pakisan Apr 1, 2024
a350a1a
feat(schemas): examples can be any type + tests for AsyncAPI and Json…
Pakisan Apr 2, 2024
8c3fbba
build: 1.0.0-RC-SNAPSHOT
Pakisan Apr 2, 2024
99f8c1f
Merge remote-tracking branch 'origin/refactor/schemas' into release/1…
Pakisan Apr 2, 2024
46b5e87
feat(openapi) OpenAPI Schema
Pakisan Apr 4, 2024
5e7e58b
feat(openapi) OpenAPI Schema extensions
Pakisan Apr 6, 2024
38b8219
feat(schemaFormat): support AsyncAPI, OpenAPI and Json Schemas
Pakisan Apr 10, 2024
fc65b73
feat(schemaFormat): support OpenAPI 3.0.1, 3.0.2, 3.0.3
Pakisan Apr 12, 2024
86f6ff8
tests(schemaFormat): new AsyncAPI Schema tests
Pakisan Apr 12, 2024
7409834
chore: project icon for IDEA
Pakisan Apr 12, 2024
1967dba
test(schemaFormat): refactor Json Schema tests
Pakisan Apr 12, 2024
d5a67c7
feat(avro schema): initial commit
Pakisan Apr 13, 2024
e38fead
feat(avro schema): schemas hierarchy
Pakisan Apr 13, 2024
dda9b18
feat(avro schema): new Avro type - error
Pakisan Apr 15, 2024
1018622
feat(avro schema): schemas required methods and basic tests
Pakisan Apr 15, 2024
2dc488e
refactor(avro schema): rename Avro*Schema to Avro* and move to 1.9.0 …
Pakisan Apr 15, 2024
87e7d32
refactor(avro schema): Avro Union + tests + default for Map and Array
Pakisan Apr 16, 2024
2c630c6
refactor(avro schema): Avro Union new constructor + types now are string
Pakisan Apr 17, 2024
2319ae9
feat(avro schema): MultiFormatSchema with Avro
Pakisan Apr 17, 2024
6caac9c
feat(avro schema): new Builder hierarchy
Pakisan Apr 18, 2024
26a8d99
refactor(avro schema): rename Avro* to AvroSchema*
Pakisan Apr 18, 2024
474edd0
refactor(avro schema): extract AvroSchemaLogicalType
Pakisan Apr 18, 2024
f7cd205
refactor(avro schema): SchemaFormat can hold Avro, AvroUnion, Reference
Pakisan Apr 20, 2024
2fbcbf9
refactor(avro schema): check schemas before merge
Pakisan Apr 20, 2024
5138ac3
refactor(openapi): move OpenAPI Schema from openapi to openapi.v3._0_0
Pakisan Apr 20, 2024
df17b80
release: 1.0.0-RC
Pakisan Apr 20, 2024
90673aa
fix: JavaDoc
Pakisan Apr 20, 2024
f662aa2
doc: README.md link to 1.0.0-RC release
Pakisan Apr 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0-RC] - 2024-04-20

### Added

- OpenAPI Schema: 3.0.0, 3.0.1, 3.0.2, 3.0.3
- Avro Schema: 1.9.0, 1.9.1, 1.9.2, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.11.1
- JsonSchema: Draft-07

### Changed

- MultiFormatSchema can hold AsyncAPI, OpenAPI, Avro and Json Schemas
- Schema was divided to AsyncAPISchema and JsonSchema

## [1.0.0-EAP-3] - 2024-03-10

Kudos to:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
> ⚠️ This project doesn't support AsyncAPI 1.x
---

[![Version](https://img.shields.io/maven-central/v/com.asyncapi/asyncapi-core?logo=apache-maven)](https://central.sonatype.com/artifact/com.asyncapi/asyncapi-core/1.0.0-EAP-3)
[![Version](https://img.shields.io/maven-central/v/com.asyncapi/asyncapi-core?logo=apache-maven)](https://central.sonatype.com/artifact/com.asyncapi/asyncapi-core/1.0.0-RC)

## Overview
JVM-friendly bindings for AsyncAPI. It allows you to read or write specifications for your asynchronous API through code
Expand Down
2 changes: 1 addition & 1 deletion asyncapi-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>asyncapi</artifactId>
<groupId>com.asyncapi</groupId>
<version>1.0.0-EAP-3</version>
<version>1.0.0-RC</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.asyncapi.v3._0_0.jackson.model.channel.message;

import com.asyncapi.v3.Reference;
import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.MultiFormatSchema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.schema.multiformat.MultiFormatSchema;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.ObjectCodec;
Expand Down Expand Up @@ -56,14 +56,14 @@ private Object chooseKnownPojo(JsonNode jsonNode, ObjectCodec objectCodec) throw
if (ref != null) {
return jsonParser.readValueAs(Reference.class);
} else {
return jsonParser.readValueAs(Schema.class);
return jsonParser.readValueAs(AsyncAPISchema.class);
}
}
}

private Object readAsObject(JsonNode jsonNode, ObjectCodec objectCodec) throws IOException {
try (JsonParser jsonParser = jsonNode.traverse(objectCodec)) {
return jsonParser.readValueAs(Schema.class);
return jsonParser.readValueAs(AsyncAPISchema.class);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.asyncapi.v3._0_0.jackson.model.channel.message;

import com.asyncapi.v3.Reference;
import com.asyncapi.v3.schema.MultiFormatSchema;
import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.multiformat.MultiFormatSchema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.ObjectCodec;
Expand Down Expand Up @@ -56,14 +56,14 @@ private Object chooseKnownPojo(JsonNode jsonNode, ObjectCodec objectCodec) throw
if (ref != null) {
return jsonParser.readValueAs(Reference.class);
} else {
return jsonParser.readValueAs(Schema.class);
return jsonParser.readValueAs(AsyncAPISchema.class);
}
}
}

private Object readAsObject(JsonNode jsonNode, ObjectCodec objectCodec) throws IOException {
try (JsonParser jsonParser = jsonNode.traverse(objectCodec)) {
return jsonParser.readValueAs(Schema.class);
return jsonParser.readValueAs(AsyncAPISchema.class);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.asyncapi.v3._0_0.jackson.model.component;

import com.asyncapi.v3.Reference;
import com.asyncapi.v3.schema.MultiFormatSchema;
import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.multiformat.MultiFormatSchema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.ObjectCodec;
Expand All @@ -17,8 +17,8 @@

public class ComponentsSchemasDeserializer extends JsonDeserializer<Object> {

public Class<Schema> objectTypeClass() {
return Schema.class;
public Class<AsyncAPISchema> objectTypeClass() {
return AsyncAPISchema.class;
}

public Class<?> referenceClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.asyncapi.v3._0_0.model.ExternalDocumentation;
import com.asyncapi.v3._0_0.model.Tag;
import com.asyncapi.v3.jackson.binding.message.MessageBindingsDeserializer;
import com.asyncapi.v3.schema.multiformat.MultiFormatSchema;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.*;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -39,14 +40,14 @@ public class Message extends ExtendableObject {
* <p>
* It MUST NOT define the protocol headers.
* <p>
* If this is a {@link com.asyncapi.v3.schema.Schema}, then the schemaFormat will be assumed to
* If this is a {@link com.asyncapi.v3.schema.AsyncAPISchema}, then the schemaFormat will be assumed to
* be "application/vnd.aai.asyncapi+json;version=asyncapi" where the version
* is equal to the AsyncAPI Version String.
* <p>
* MUST BE:
* <ul>
* <li>{@link com.asyncapi.v3.schema.Schema}</li>
* <li>{@link com.asyncapi.v3.schema.MultiFormatSchema}</li>
* <li>{@link com.asyncapi.v3.schema.AsyncAPISchema}</li>
* <li>{@link MultiFormatSchema}</li>
* <li>{@link com.asyncapi.v3.Reference}</li>
* </ul>
*/
Expand All @@ -57,13 +58,13 @@ public class Message extends ExtendableObject {
/**
* Definition of the message payload.
* <p>
* If this is a {@link com.asyncapi.v3.schema.Schema}, then the schemaFormat will be assumed to be
* If this is a {@link com.asyncapi.v3.schema.AsyncAPISchema}, then the schemaFormat will be assumed to be
* "application/vnd.aai.asyncapi+json;version=asyncapi" where the version is equal to the AsyncAPI Version String.
* <p>
* MUST BE:
* <ul>
* <li>{@link com.asyncapi.v3.schema.Schema}</li>
* <li>{@link com.asyncapi.v3.schema.MultiFormatSchema}</li>
* <li>{@link com.asyncapi.v3.schema.AsyncAPISchema}</li>
* <li>{@link MultiFormatSchema}</li>
* <li>{@link com.asyncapi.v3.Reference}</li>
* </ul>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.asyncapi.v3._0_0.model.ExternalDocumentation;
import com.asyncapi.v3._0_0.model.Tag;
import com.asyncapi.v3.jackson.binding.message.MessageBindingsDeserializer;
import com.asyncapi.v3.schema.multiformat.MultiFormatSchema;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.*;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -39,14 +40,14 @@ public class MessageTrait extends ExtendableObject {
* <p>
* It MUST NOT define the protocol headers.
* <p>
* If this is a {@link com.asyncapi.v3.schema.Schema}, then the schemaFormat will be assumed to
* If this is a {@link com.asyncapi.v3.schema.AsyncAPISchema}, then the schemaFormat will be assumed to
* be "application/vnd.aai.asyncapi+json;version=asyncapi" where the version
* is equal to the AsyncAPI Version String.
* <p>
* MUST BE:
* <ul>
* <li>{@link com.asyncapi.v3.schema.Schema}</li>
* <li>{@link com.asyncapi.v3.schema.MultiFormatSchema}</li>
* <li>{@link com.asyncapi.v3.schema.AsyncAPISchema}</li>
* <li>{@link MultiFormatSchema}</li>
* <li>{@link com.asyncapi.v3.Reference}</li>
* </ul>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import com.asyncapi.v3.jackson.binding.message.MessageBindingsDeserializer;
import com.asyncapi.v3.jackson.binding.operation.OperationBindingsDeserializer;
import com.asyncapi.v3.jackson.binding.server.ServerBindingsDeserializer;
import com.asyncapi.v3.schema.MultiFormatSchema;
import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.multiformat.MultiFormatSchema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.security_scheme.SecurityScheme;
import com.asyncapi.v3.ExtendableObject;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
Expand Down Expand Up @@ -52,12 +52,12 @@ public class Components extends ExtendableObject {
/**
* An object to hold reusable Schema Object.
* <p>
* If this is a {@link Schema}, then the schemaFormat will be assumed to be "application/vnd.aai.asyncapi+json;version=asyncapi"
* If this is a {@link AsyncAPISchema}, then the schemaFormat will be assumed to be "application/vnd.aai.asyncapi+json;version=asyncapi"
* where the version is equal to the AsyncAPI Version String.
* <p>
* MUST BE:
* <ul>
* <li>{@link Schema}</li>
* <li>{@link AsyncAPISchema}</li>
* <li>{@link MultiFormatSchema}</li>
* <li>{@link Reference}</li>
* </ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v3.binding.channel.ws;

import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.channel.ChannelBinding;
import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -43,7 +43,7 @@ public class WebSocketsChannelBinding extends ChannelBinding {
@Nullable
@JsonProperty("query")
@JsonPropertyDescription("A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.")
private Schema query;
private AsyncAPISchema query;

/**
* A Schema object containing the definitions of the HTTP headers to use when establishing the connection.
Expand All @@ -52,7 +52,7 @@ public class WebSocketsChannelBinding extends ChannelBinding {
@Nullable
@JsonProperty("headers")
@JsonPropertyDescription("A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type object and have a properties key.")
private Schema headers;
private AsyncAPISchema headers;

/**
* The version of this binding. If omitted, "latest" MUST be assumed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v3.binding.message.anypointmq;

import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.message.MessageBinding;
import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -31,7 +31,7 @@ public class AnypointMQMessageBinding extends MessageBinding {
@Nullable
@JsonProperty("headers")
@JsonPropertyDescription("A Schema object containing the definitions for Anypoint MQ-specific headers (so-called protocol headers). This schema MUST be of type object and have a properties key. Examples of Anypoint MQ protocol headers are messageId and messageGroupId.")
private Schema headers;
private AsyncAPISchema headers;

/**
* The version of this binding.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v3.binding.message.http;

import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.message.MessageBinding;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down Expand Up @@ -30,7 +30,7 @@ public class HTTPMessageBinding extends MessageBinding {
@Nullable
@JsonProperty("headers")
@JsonPropertyDescription("A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.")
private Schema headers;
private AsyncAPISchema headers;

/**
* The version of this binding.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v3.binding.message.kafka;

import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.message.MessageBinding;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down Expand Up @@ -29,7 +29,7 @@ public class KafkaMessageBinding extends MessageBinding {
@Nullable
@JsonProperty("key")
@JsonPropertyDescription("The message key.")
private Schema key;
private AsyncAPISchema key;

/**
* If a Schema Registry is used when performing this operation, tells where the id of schema is stored (e.g. header or payload).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v3.binding.operation.http;

import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.operation.OperationBinding;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down Expand Up @@ -52,7 +52,7 @@ public class HTTPOperationBinding extends OperationBinding {
@Nullable
@JsonProperty("query")
@JsonPropertyDescription("A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.")
private Schema query;
private AsyncAPISchema query;

/**
* The version of this binding. If omitted, "latest" MUST be assumed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v3.binding.operation.kafka;

import com.asyncapi.v3.schema.Schema;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.operation.OperationBinding;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down Expand Up @@ -29,15 +29,15 @@ public class KafkaOperationBinding extends OperationBinding {
@Nullable
@JsonProperty("groupId")
@JsonPropertyDescription("Id of the consumer group.")
private Schema groupId;
private AsyncAPISchema groupId;

/**
* Id of the consumer inside a consumer group.
*/
@Nullable
@JsonProperty("clientId")
@JsonPropertyDescription("Id of the consumer inside a consumer group.")
private Schema clientId;
private AsyncAPISchema clientId;

/**
* The version of this binding. If omitted, "latest" MUST be assumed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.asyncapi.v3.jackson;

import com.asyncapi.v3.schema.Schema;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
Expand All @@ -13,7 +12,9 @@
import java.util.ArrayList;
import java.util.List;

public class SchemaItemsDeserializer extends JsonDeserializer<Object> {
public abstract class SchemaItemsDeserializer<Schema> extends JsonDeserializer<Object> {

abstract public Class<Schema> schemaClass();

@Override
public Object deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
Expand All @@ -39,7 +40,7 @@ private List<Schema> readAsListOfSchemas(ArrayNode arrayNode, ObjectCodec object

private Schema readAsSchema(JsonNode jsonNode, ObjectCodec objectCodec) throws IOException {
try (JsonParser parser = jsonNode.traverse(objectCodec)) {
return parser.readValueAs(Schema.class);
return parser.readValueAs(schemaClass());
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.asyncapi.v3.jackson.schema;

import com.asyncapi.v3.schema.AsyncAPISchema;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;

import java.io.IOException;

/**
* @author Guillaume LAMIRAND (guillaume.lamirand at graviteesource.com)
* @author GraviteeSource Team
*/
public class AsyncAPISchemaAdditionalPropertiesDeserializer extends JsonDeserializer<Object> {

@Override
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
ObjectCodec objectCodec = p.getCodec();
JsonNode node = objectCodec.readTree(p);

return chooseKnownPojo(node, objectCodec);
}

private Object chooseKnownPojo(JsonNode jsonNode, final ObjectCodec objectCodec) throws IOException {
try (JsonParser jsonParser = jsonNode.traverse(objectCodec)) {
if (jsonNode.isBoolean()) {
return jsonNode.asBoolean();
} else {
return jsonParser.readValueAs(AsyncAPISchema.class);
}
}
}
}
Loading
Loading