Skip to content

Problematic json schema for unspecified arrays #53

Closed
@mduesterhoeft

Description

@mduesterhoeft

If one does just document an array without documenting the item type we generate a json schema like this:

"serviceableCountries": {
  "description": "The list of target countries this payment method can be used in.",
  "type": "array"
}

This seems to be valid json schema but I have seen tools complaining about this. In such a case we should generate a schema like this:

"serviceableCountries": {
  "description": "The list of target countries this payment method can be used in.",
  "type": "array",
  "items": {
     "type": "object"
  }
}

Metadata

Metadata

Assignees

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