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

JSON schema to RAML not converting arrays #111

Description

@ettoregia

The below JSON schema produce the below RAML library which displays the records item not as an array:

#%RAML 1.0 Library
types:
  account.raml:
    type: object
    additionalProperties: true
    properties:
      totalSize:
        type: integer
        required: true
      done:
        type: boolean
        required: true
      records:
        (amf-tuple): true
        required: true 
 {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "totalSize": {
      "type": "integer"
    },
    "done": {
      "type": "boolean"
    },
    "records": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "attributes": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "url"
              ]
            },
            "testCcodeAbanderamiento__c": {
              "type": "null"
            }
          },
          "required": [
            "attributes",
            "Name",
            "testCcodeAbanderamiento__c"
          ]
        },
        {
          "type": "object",
          "properties": {
            "attributes": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "url"
              ]
            },
            "Name": {
              "type": "string"
            },
            "testCcodeAbanderamiento__c": {
              "type": "null"
            }
          },
          "required": [
            "attributes",
            "testCcodeAbanderamiento__c"
          ]
        },
        {
          "type": "object",
          "properties": {
            "attributes": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "url"
              ]
            },
            "Name": {
              "type": "string"
            },
            "testCcodeAbanderamiento__c": {
              "type": "null"
            }
          },
          "required": [
            "attributes"
          ]
        }
      ]
    }
  },
  "required": [
    "totalSize",
    "done",
    "records"
  ]
}

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