Book a Demo

Author Topic: generate JSON attributes with the schema composer  (Read 7559 times)

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
generate JSON attributes with the schema composer
« on: April 01, 2017, 08:43:40 pm »
Hello All,

the schema composer generates JSON properties from a class model as follows:
- JSON property name = attribute name
- JSON property type = attribute type
- JSON property description = attribute description

Question: can the schema composer generate JSON attributes minLength, maxLength, pattern, format? How to specify these attributes in the class model?

Many thanks,

Alex.

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
Re: generate JSON attributes with the schema composer
« Reply #1 on: April 01, 2017, 10:31:34 pm »
Additional question:
- the schema composer generates JSON schemas with properties (class attributes) ordered by name. Is there a way to preserve the order of the properties - e.g. the order to be the same as the order of the class attributes in the class model?

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
Re: generate JSON attributes with the schema composer
« Reply #2 on: April 18, 2017, 12:12:06 am »
Found the info I needed on pages 16-17 in this document: http://www.sparxsystems.com.au/resources/user-guides/model-domains/schema-models.pdf