Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot distinguish which class is a request for some of these #137

Open
contractpendev opened this issue Oct 17, 2018 · 2 comments
Open

Comments

@contractpendev
Copy link

This is not exactly a bug, more a topic for discussion and a problem for me.

For the ContractPen (contractpen.com) project I have developed an importer which imports this code into ContractPen data models. In the case of Eat Apples it is difficult to determine which class is the request class by looking at the model code alone.

https://github.com/accordproject/cicero-template-library/blob/master/src/eat-apples/models/model.cto

Although I can determine it by looking at the Ergo code, my opinion - it would be nice to require request classes to be marked as request somehow, either by inheritance or other.

@mttrbrts
Copy link
Member

Well spotted, I think that this is simply a mistake in the eatapples template. Other templates extend the system Request and Response types, e.g. https://github.com/accordproject/cicero-template-library/blob/master/src/acceptance-of-delivery/models/model.cto

Clearly this convention isn't enforced at the moment, @jeromesimeon is there a good reason why this shouldn't be enforced?

@jeromesimeon
Copy link
Member

Agreed, this should be fixed. This template was done before we had a proper hierarchy, but it should inherit from Request / Response in the common model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants