Gemstone/S – Modelling support for Swagger, JSON

PUModeller has the whole information of the models. Association are created via OrderedCollection but with Gemstone support I added the possibility to have unique-keyed dictionary realization of associations – nice to have, if you want to look-up elements via unique (not changeable) keys.

But now to the realized swagger supprt. PUM has to transfer parts of its model into the JSON oriented specification of swagger.

Full automation is not possible, but PUM creates help methods to define swagger specs for partial classes (without associations) and full classes (with associations). Associations are less needed, because it would lead to export of large structures. Perhaps not what you want to have if you create answers of REST calls. In addition it creates list models of partial classes – nice to use if you scroll (via rest calls) through a list of elements.

Swagger means also JSON: PUM creates methods defining special mapping for the JSON export of data and offers some special conversions support:

DateTimeWithStamps are converted automatically to UTC and Javascript number. This seems to be practicable for JS clients.

Enumerations are converted from their numerical internal value to their textual representation.

JSON support is based on Neo-JSON.

This entry was posted in Smalltalk and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s