{ "name": "apidoc-generator-attributes", "description": "This specified additional options that can be specified when using Movio's scala generators", "models": { "scala_model_props": { "description": "Additional code generation information for case classes", "fields": [ { "name": "extends", "type": "[string]", "required": false, "description": "A list of Scala/Java classes that this model extends", "example": "[com.github.BaseClass1, com.github.BaseClass2]" } ] }, "scala_field_props": { "description": "Additional code generation information for case class fields", "fields": [ { "name": "class", "type": "string", "required": false, "description": "The fully qualified Scala/Java class to use during implementation. Note that this class must have a json formatter defined in the generator code. Currenly only org.joda.time.LocalDate and org.joda.time.LocalDateTime are implemented. In the future this maybe a defined list of supported classes", "example": "org.joda.time.LocalDate" }, { "name": "default", "type": "string", "required": false, "description": "Used as the default in a case class." }, { "name": "example", "type": "string", "required": false, "description": "Used in documentation and as a default implementation when creating example implementation's of case classes" } ] }, "kafka_props": { "description": "Information needed for generating Kafka wrappers, consumers and producers.", "fields": [ { "name": "data_type", "type": "string", "required": true, "description": "This is the name of the model that this kafka wrapper encapsulated. Model name is the same as defined in the models section", "example": "person_address" }, { "name": "topic", "type": "string", "required": true, "description": "[scala] This is a scala snippet that returns a string with the topic name for kafka. The generator creates a function on the kafka topic object `def topic(tenant: String) = `" }, { "name": "message_generate_key", "type": "string", "default": "java.util.UUID.randomUUID().toString", "description": "[scala] This is a scala snippet that creates a string used as the message ID. The message ID is used as the kafka message ID. The generator creates a function on the case class `def generateKey(tenant: String) = `" } ] }, "field_validation": { "description": "Additional validation options not currently in the standard apidoc spec", "fields": [ { "name": "regex", "type": "string", "required": false, "description": "Regex string to validate the field with. The field must be a `string` or `[string]`. If the field is a `[string]` all elements in the array will be validated", "example": "^[A-Za-z]+$" }, { "name": "maximum", "type": "long", "required": false, "description": "This applies only to `[string]`, `[integer]` and `[long]`. The current apidoc spec includes maximum however for an array this the maxium size of the array. This validates the max length or number of each element of the array. The field must be a `[string]`, `[integer]` or `[long]`. All elements in the array will be validated as per standard apidoc specs" }, { "name": "minimum", "type": "long", "required": false, "description": "This applies only to `[string]`, `[integer]` and `[long]`. The current apidoc spec includes minimum however for an array this the minimum size of the array. This validates the minimum length or number of each element of the array. The field must be a `[string]`, `[integer]` or `[long]`. All elements in the array will be validated as per standard apidoc specs" } ] } } }