Transforms a Hydra API doc in an intermediate representation that can be used for various tasks such as creating smart API clients, scaffolding code or building administration interfaces.
I've tried to document my assumptions - the OpenAPI3 doesn't really represent 'resources', exactly, so there's quite a bit of translation involved. I pulled in an external library to deal with the '$ref' mechanism used in the spec; I've also added some field attributes like 'embedded' that the Admin code seemed to need.
I haven't yet explored types etc much - this PR is mainly to test the waters on my approach, and the receptivity of the team for this kind of change.
Thanks for the library. :)
PS. I added 'lib' to the tsconfig.json 'cause I was getting warnings about overwriting the type files. I'm not very experienced with TypeScript but this seemed to fix the problem.
To get API Platform's Admin working in my project I needed OpenAPI3 support; the current parsing code didn't work for me so I've been experimentally writing some that lines up a bit closer with the [https://swagger.io/specification/](OpenAPI3 spec).
I've tried to document my assumptions - the OpenAPI3 doesn't really represent 'resources', exactly, so there's quite a bit of translation involved. I pulled in an external library to deal with the '$ref' mechanism used in the spec; I've also added some field attributes like 'embedded' that the Admin code seemed to need.
I haven't yet explored types etc much - this PR is mainly to test the waters on my approach, and the receptivity of the team for this kind of change.
Thanks for the library. :)
PS. I added 'lib' to the
tsconfig.json
'cause I was getting warnings about overwriting the type files. I'm not very experienced with TypeScript but this seemed to fix the problem.