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

Problems in Swagger client generation #358

Open
bodom0015 opened this issue Oct 8, 2019 · 0 comments
Open

Problems in Swagger client generation #358

bodom0015 opened this issue Oct 8, 2019 · 0 comments

Comments

@bodom0015
Copy link
Member

bodom0015 commented Oct 8, 2019

Going forward, since Girder exports a Swagger spec it would be nice to ingest this and use it to generate an Angular REST API client for WholeTale/Girder. A prototype @api module has been hacked together, but ideally this is not something that we want to manually maintain over time if it can be generated.

Furthermore, some of these issues are with Girder's own built-in schemas, so I'm not quite sure what options we have at our disposal for handling that.

See https://github.com/whole-tale/ngx-dashboard/commits/master/src/app/api for history

Major schema issues:

  • No model / return type specified for most built-in API calls (e.g. folder, item, group, etc)
    • none of these models were generated by default, since it appears to swagger-gen that they are not being used anywhere
  • Missing some body parameters for POST/PUT calls (e.g. chunk for file uploads)
  • Some fields say "String" but expect a JSON-stringified object - I know that this is because we send all parameters in the querystring, but none of this should be necessary

Minor schema issues:

  • Many model schemas are missing _accessLevel (e.g. tale._accessLevel)
  • dataSet schema missing optional required _modelType
  • tale.publishInfo appears to have the wrong schema (this should be an array, right?)

Open Questions:

  • what type/schema to put for String? My current hack generated a bunch of import { String } from './String'; at the top of each model class, which is obviously not correct
  • dataSet / DataSet are entirely different models with different schemas - can we possibly consolidate?

Manual changes necessary to generate initial (hacked) API client:

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

No branches or pull requests

1 participant