Is it possible to out put a file per object when generating Swift?
I have JSON Schema files that refer to each other, but the referenced schema is creating in the same file, thus causing duplicate symbols when compiled.
The User.swift file generated has a User and Address struct in it, I'd like them to be separate files.
E.g
User Schema: User.schema
{
"$ref": "#/definitions/User",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"User": {
"additionalProperties": false,
"properties": {
"basket_value": {
"type": "integer"
},
"default_address": {
"$ref": "./Address.schema"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"user_id": {
"type": "integer"
}
},
"required": [
"default_address",
"first_name",
"last_name",
"user_id"
],
"title": "user",
"type": "object"
}
}
}
Address Schema: Address.schema
{
"$ref": "#/definitions/Address",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"Address": {
"additionalProperties": false,
"properties": {
"address_id": {
"type": "integer"
},
"city": {
"type": "string"
},
"postcode": {
"type": "string"
}
},
"required": [
"address_id",
"city",
"postcode"
],
"title": "address",
"type": "object"
}
}
}
Is it possible to out put a file per object when generating Swift?
I have JSON Schema files that refer to each other, but the referenced schema is creating in the same file, thus causing duplicate symbols when compiled.
The User.swift file generated has a
UserandAddressstructin it, I'd like them to be separate files.E.g
User Schema: User.schema
Address Schema: Address.schema