Fields properties are meta data that can be associated to each fields.

They are listed between { } directly following the declaration of a field and its type

type Person{
      label:"last name of the person"
      example: ["Watson","Duchemin","Malik"]
      maxLength: 35
required } firstName:String age:Integer address:Address skills:[Skills] }


Standard Fields properties :

  • label (String)
    • short description of the filed
  • description (String)
    • description of the field
  • comment (String)
    • Allows you to add a comment to the field
  • urlExternalDescription (String)
    • url pointing to an external description of the field
  • deprecated (Boolean)
    • indicates that this field is depracated and should not be used in the future.
  • regex (String)
    • Regular expression validating the possible values of the field.
  • example (depends on the type of field)
    • valeur d'example pour le champ,
    • can be indifferently a value 5 , a list of values [5, 10, 15] or an interval 5 .. 15
  • min (depends on the type of field)
    • minimum field value
  • max (depends on the type of field)
    • maximum field value
  • exclusiveMinimum (Boolean)
    •  Exclusion of the minimum value (defined by the min property)
  • exclusiveMaximum (Boolean)
    • Exclusion of the maximum value (defined by the max property)
  • minLength (Integer) - exclusively for String types
    • minimum string length
  • maxLength (Integer) - exclusively for String types
    • maximum String length
  • minItems (Integer) - mainly for lists
    • minimum number of items requested in the list
    • It's also possible to assign a value of 1 to minItems on a scalar field (String, Integer...) to indicate that the field is conceptually required, without it becoming required on all facades that use it.
  • maxItems (Integer) - exclusively for lists
    • maximum number of items accepted in the list
  • associationName (String) - exclusively for complex type  
    • name of the association between the current entity and the entity targed by the field
  • associationType (String) - exclusively for complex type  
    • Type of the association between the current entity and the entity targed by the field
      • Association, Composition or Aggregation
  • reverse (field name)
    • Defines an inverse relationship with a field of another type, pointing to the type to which the field belongs. eg.
      • type Team{persons:[Person]},
      • type Person{ team: [Team]{ reverse:persons }}
  • default (depends on the type of field)
    • default value if the field is missing.
  • nullable (Boolean)
    • accept null as value for this field

  • stopx (Boolean)
    • Tells the data explorer to stop by default its exploration on this type. These meta data allow to better control the exploration of complex model
  • glossary (String) - Enterprise plan
    • Allows you to associate a glossary entry with the field to describe it
  • required (Boolean)
    • To be valid, an instance of this object must have this field filled
  • readOnly (Boolean)
    • This field may be sent as part of a response but should not be sent as part of the request
    • if required AND readOnly, the field will be required on the response only
  • writeOnly (Boolean)
    • This field may be sent as part of a request but should not be sent as part of the response 
    • if required AND writeOnly, the field will be required on the request only
Note : The required, readOnly and writeOnly properties defined at the field level of a type will be propagated to all facades defined on this type.
We strongly recommend to define these properties at the individual facade level.

All these properties are used by Akwatype during the different generations (Graphs, OpenAPI, Excel, Json example...).

note : Akwatype allows you to create and use your own custom properties in addition to the standard akwatype properties (see related articles).