Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Additional properties don't support Json Array type #22

@VamshikShetty

Description

@VamshikShetty

Currently OAS 3.0 spec is not in sync with server response structure and might be providing more params than mentioned in spec. To fix this issue we allowed additional properties to be created if not present as mentioned in issue #16 and committed fix in PR #18.
But when additional params are provided in form of Array rather Object or primitive type deserialisation of structure faces following exception:

Exception in thread "main" java.lang.ClassCastException: class com.google.gson.JsonArray cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonArray and com.google.gson.JsonObject are in unnamed module of loader 'app')
        at com.google.gson.JsonObject.getAsJsonObject(JsonObject.java:192)

Solution: At bare minimum we need to get Equinix OAS 3.0 closer to server response at least for array type params and in long run make sure that all the params returned by Equinix env are present in spec then we can change generated code behaviour to be strict on additional properties.

This issue will also track, list of models in Equinix OAS 3.0 which are incomplete relative to their server response as we find them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions