momenttech / lysis

CLI and engine for code generation from JSON LD APIs
MIT License
18 stars 3 forks source link

Add Json and Relations field type #10

Open mustafa-natiq opened 2 years ago

mustafa-natiq commented 2 years ago

Hi,

Nice to see an Angular client generator for API Platform / Hydra-based APIs. I see that the ranges for field type are very limited. Like JSON and all the relationship types such as ManyToOne, OneToMany, etc field types are missing which is very commonly used in applications though.

var ranges = {
      'http://www.w3.org/2001/XMLSchema#integer': 'integer',
      'http://www.w3.org/2001/XMLSchema#decimal': 'decimal',
      'http://www.w3.org/2001/XMLSchema#string': 'string',
      'http://www.w3.org/2001/XMLSchema#boolean': 'boolean',
      'http://www.w3.org/2001/XMLSchema#date': 'date',
      'http://www.w3.org/2001/XMLSchema#time': 'time',
      'http://www.w3.org/2001/XMLSchema#dateTime': 'dateTime'
    };

Can we include or add the missing field types (which are used mostly) in the ranges?