swagger-api / swagger-api/swagger-core
Serialize ComposedSchema is missing type of "object" in OpenAPI 3.1
Open
Nobody has claimed this yet.
backlog
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
It is happing in openAPI version 3.1
I think it's related to miss a construct method to add type of "object".
diff --git a/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java b/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java
index deea38906..5e4d37134 100644
--- a/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java
+++ b/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java
@@ -5,7 +5,9 @@ package io.swagger.v3.oas.models.media;
*/
public class ComposedSchema extends Schema<Object> {
+ public ComposedSchema() {
+ super("object", null);
+ }
@Override
public String toString() {
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java and inspect how its superclass is constructed and serialized for OpenAPI 3.1. Confirm the change preserves existing composed-schema behavior and that serialized output includes type "object".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100