lutaml / expressir

Ruby parser for the ISO EXPRESS language
3 stars 3 forks source link

Provide proper documentation on API #94

Open ronaldtse opened 3 years ago

ronaldtse commented 3 years ago

From @opoudjis :

There is nothing in https://github.com/lutaml/expressir that tells me how to generate a complete, unformatted schema listing from a schema.

https://github.com/metanorma/annotated-express/issues/18

Please help with this, thanks @zakjan

zakjan commented 3 years ago

Hi @opoudjis @ronaldtse Model documentation is available at https://rubydoc.info/github/lutaml/expressir/master/Expressir/Model - let me know if there is anything to improve. I'm not sure what does "complete, unformatted schema listing from a schema" mean.

zakjan commented 3 years ago

If you are looking for a method to generate source code, this method accepts any model instance https://rubydoc.info/github/lutaml/expressir/master/Expressir/Express/Formatter#format-class_method

ronaldtse commented 3 years ago

@zakjan can we have:

Could we supplement this with the actual text from the document?

zakjan commented 3 years ago

Description of the functionality Some examples on how to use the gem

I can update readme and add most common examples, does it help? Readme is obsolete anyway, I focused on the functionality and YARD docs, haven't touched readme at all yet.

Config/Configure is a remnant of the previous version, unfortunately I have no idea how it was supposed to be used. I can delete it.

How to traverse nodes and do things on encountering a parse node

The output from Parser.parse is Repository, all children can be traversed down. I'm not sure what more to add. I'll make sure there is an example in the readme.

Additional info on models ... Could we supplement this with the actual text from the document?

I can copy there the entire section text from PDF spec as-is, manually formatted. Is it ok to make it publicly available with your license? Alternatively, is there an online version of the spec to link to?