Author Topic: Schema Composer  (Read 90 times)

MrSnow

  • EA User
  • **
  • Posts: 20
  • Karma: +1/-0
    • View Profile
Schema Composer
« on: February 12, 2019, 07:12:06 pm »
Hi all,

I am using the Schema Composer to generate JSON Schema's and XML Schema's (XSD). I have read the documentation EA provides for the Schema Composer, but I am still seeing what I would refer to as "random behaviour" when I generate JSON's. Does anybody know what the Schema Composer is built upon, if it is possible to configure it or make complete sense of it?

To me (and apparently others as well) it is a black box. Are there anyone with some knowledge of what is inside that box?


/MrSnow

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8925
  • Karma: +233/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Schema Composer
« Reply #1 on: February 12, 2019, 07:42:45 pm »
Hi,

I only use the "cherrypicking" part of the schema composer (which works really well).
I have developed my own add-in to do generate my own stuff based on the selection. In my case I'm generating a subset model.
This subset model is then used by other add-ins, scripts, or the standard XSD generation to generate the required output (JSON, XSD, html,...)

Writing an add-in allows me to control exactly what is happening when the user clicks "generate"

So unless the currently generated results fit you for 100%, I'm afraid that is the route to follow.

My add-in for the schema composer is free and open source: EA Message Composer. If I were to generate JSON I would probably use my add-in to generate a subset model, and then use a script or add-in to generate the JSON schema from that subset model.

An alternative is to generate to XSD, and then convert the XSD to a JSON Schema. XmlSpy is a tool that can do this.

Geert