diff --git a/schemas/pointer/region.schema.yaml b/schemas/pointer/region.schema.yaml index 0ab06a053c..e2f7f5e705 100644 --- a/schemas/pointer/region.schema.yaml +++ b/schemas/pointer/region.schema.yaml @@ -9,24 +9,31 @@ properties: location: $ref: "#/$defs/Location" +required: + - location + allOf: - if: + required: + - location properties: location: const: stack - then: $ref: "schema:ethdebug/format/pointer/region/stack" - if: + required: + - location properties: location: const: memory - then: $ref: "schema:ethdebug/format/pointer/region/memory" - if: + required: + - location properties: location: const: storage @@ -34,6 +41,8 @@ allOf: $ref: "schema:ethdebug/format/pointer/region/storage" - if: + required: + - location properties: location: const: calldata @@ -41,6 +50,8 @@ allOf: $ref: "schema:ethdebug/format/pointer/region/calldata" - if: + required: + - location properties: location: const: returndata @@ -48,6 +59,8 @@ allOf: $ref: "schema:ethdebug/format/pointer/region/returndata" - if: + required: + - location properties: location: const: transient @@ -55,6 +68,8 @@ allOf: $ref: "schema:ethdebug/format/pointer/region/transient" - if: + required: + - location properties: location: const: code diff --git a/schemas/program/context/name.schema.yaml b/schemas/program/context/name.schema.yaml index bbac4c8b48..0c0d48daca 100644 --- a/schemas/program/context/name.schema.yaml +++ b/schemas/program/context/name.schema.yaml @@ -25,6 +25,7 @@ type: object properties: name: type: string + minLength: 1 required: - name diff --git a/schemas/type/complex/function.schema.yaml b/schemas/type/complex/function.schema.yaml index 21b8992e45..b6c61c8736 100644 --- a/schemas/type/complex/function.schema.yaml +++ b/schemas/type/complex/function.schema.yaml @@ -62,6 +62,10 @@ properties: definition: $ref: "schema:ethdebug/format/type/definition" +required: + - kind + - contains + oneOf: - type: object title: External function type @@ -86,7 +90,9 @@ oneOf: title: Contract type wrapper properties: type: - $ref: "schema:ethdebug/format/type/elementary/contract" + oneOf: + - $ref: "schema:ethdebug/format/type/elementary/contract" + - $ref: "schema:ethdebug/format/type/reference" required: - external @@ -161,4 +167,6 @@ $defs: type: object properties: type: - $ref: "schema:ethdebug/format/type/complex/tuple" + oneOf: + - $ref: "schema:ethdebug/format/type/complex/tuple" + - $ref: "schema:ethdebug/format/type/reference" diff --git a/schemas/type/elementary.schema.yaml b/schemas/type/elementary.schema.yaml index 91642bf965..0dfb9168be 100644 --- a/schemas/type/elementary.schema.yaml +++ b/schemas/type/elementary.schema.yaml @@ -8,6 +8,10 @@ type: object properties: kind: $ref: "#/$defs/Kind" + contains: + not: + description: "Elementary types **must not** specify a `contains` field + (to make it easier to discriminate elementary vs. complex)" required: - kind diff --git a/schemas/type/elementary/contract.schema.yaml b/schemas/type/elementary/contract.schema.yaml index df90907758..48d4eeb47d 100644 --- a/schemas/type/elementary/contract.schema.yaml +++ b/schemas/type/elementary/contract.schema.yaml @@ -14,6 +14,10 @@ properties: type: boolean description: If this field is omitted, this type represents an address whose payability is not known. + library: + type: boolean + interface: + type: boolean definition: $ref: "schema:ethdebug/format/type/definition"