j-d-carmichael / boats

Beautiful Open Api Template System
MIT License
57 stars 8 forks source link

New option in permissionConfig to allow auto-generation of an enum schema with all permissions as values. #57

Closed zewish closed 3 years ago

zewish commented 3 years ago

Expected example schema generated when the option is enabled:

PermissionsSchemaNameGoesHere:
  type: string
  enum:
    - readEndpoint1Get
    - writeEndpoint2Post
    - readEndpoint2Get

This is optional and non-breaking change. Ensured there's 100% code-coverage as usual.

j-d-carmichael commented 3 years ago

Looks good :+1:

Only 2 minor comments

j-d-carmichael commented 3 years ago

convo for potential future ref about the ref parser swictheroo

zewish — Today at 09:01 "json-schema-ref-parser" just exports "@apidevtools/json-schema-ref-parser" but the types of "json-schema-ref-parser" are wrong