Using the CLI and passing the --density normal switch causes the suppression of comments when the source language is JSON Schema.
Example Schema
{
"$ref": "#/definitions/ServerCommunication",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"ServerCommunication": {
"additionalProperties": false,
"properties": {
"msg_for_user": {
"description": "A message to be displayed to the user. Human readable, English",
"type": "string"
},
"server_error": {
"description": "A human readable error message",
"type": "string"
},
"status_code": {
"description": "Error code returned from the server",
"type": "integer"
}
},
"required": [
"msg_for_user",
"server_error",
"status_code"
],
"title": "server_communication",
"type": "object"
}
}
}
Command 1 (produces Swift with comments):
"--alphabetize-properties" "--no-initializers" "--src" "ServerCommunication.schema" "--src-lang" "schema" "--lang" "swift" "--top-level" "ServerCommunication" -o "ServerCommunication.swift"
Command 2 (produces Swift without comments):
"--alphabetize-properties" "--no-initializers" "--density" "normal" "--src" "ServerCommunication.schema" "--src-lang" "schema" "--lang" "swift" "--top-level" "ServerCommunication" -o "ServerCommunication.swift"
Using the CLI and passing the
--density normalswitch causes the suppression of comments when the source language is JSON Schema.Example Schema
Command 1 (produces Swift with comments):
"--alphabetize-properties" "--no-initializers" "--src" "ServerCommunication.schema" "--src-lang" "schema" "--lang" "swift" "--top-level" "ServerCommunication" -o "ServerCommunication.swift"Command 2 (produces Swift without comments):
"--alphabetize-properties" "--no-initializers" "--density" "normal" "--src" "ServerCommunication.schema" "--src-lang" "schema" "--lang" "swift" "--top-level" "ServerCommunication" -o "ServerCommunication.swift"