wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

Bug: In wrap manifest, generic map type has extra values outside the spec

Open krisbitney opened this issue 2 years ago • 2 comments

Describe the bug The value property in MapDefinition is supposed to be a GenericDefinition. However, the WRAP manifest for the map-type test case has a MapDefinition with a value property that has extra properties attached.

              "value": {
                "type": "Map<String, Int>",
                "name": "nestedMap",
                "key": {
                  "name": "nestedMap",
                  "type": "String",
                  "required": true,
                  "kind": 4
                },
                "value": {
                  "name": "nestedMap",
                  "type": "Int",
                  "required": true,
                  "kind": 4
                },
                "required": true,
                "scalar": {
                  "name": "nestedMap",
                  "type": "Int",
                  "required": true,
                  "kind": 4
                },
                "kind": 262146
              },

Expected behavior I would expect the manifest to strictly follow the spec. Deviations from the spec can cause problems in statically typed languages.

krisbitney avatar Apr 27 '23 17:04 krisbitney

Nice find! Are these additional properties making their way into the wrap.info artifact?

dOrgJelli avatar Apr 27 '23 17:04 dOrgJelli

Nice find! Are these additional properties making their way into the wrap.info artifact?

Yeah, they are in it. The json segment I shared comes from deserializing the wrap.info.

krisbitney avatar Apr 27 '23 19:04 krisbitney