-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When we load an OAS 3.1 document from JSON/YAML, unknown fields are not currently identified as extensions since they are being added via set. Either Schema#set should be aware of the known properties so that unknown properties are internally identified as extensions, or we should call addExtension when processing these properties:
smallrye-open-api/core/src/main/java/io/smallrye/openapi/runtime/io/media/SchemaIO.java
Lines 126 to 134 in 9cf2fed
| // Read unknown fields | |
| for (Entry<String, V> entry : jsonIO().properties(node)) { | |
| String name = entry.getKey(); | |
| V fieldNode = entry.getValue(); | |
| if (!PROPERTIES_DATA_TYPES.containsKey(name) && !name.equals(PROP_TYPE) && !name.equals(PROP_NAME) | |
| && !name.equals(PROP_REF)) { | |
| schema.set(name, jsonIO().fromJson(fieldNode)); | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working