sebastianhaas / medical-appointment-scheduling-server

NodeJS-driven backend for medical-appointment-scheduling
https://github.com/sebastianhaas/medical-appointment-scheduling
62 stars 35 forks source link

Swagger Definition? #17

Open senften opened 7 years ago

senften commented 7 years ago

Would you be willing to commit your swagger definition file for your API? I have been reviewing your client example and would find that definition helpful.

sebastianhaas commented 7 years ago

You could just npm start it and navigate to http://0.0.0.0:3000/explorer/swagger.json

A YAML version is available by running slc loopback:export-api-def from the root directory (strongloop package is required for slc).

Is there a reason this is not feasible for you? I could commit a definition file, but then again, I have to make sure it stays up to date. :)

senften commented 7 years ago

No, thank you for the offer; this will work for my purposes. I hadn't considered that as I was navigating through the source, but it leads me to another question for you.

Are you using swagger and swagger codegen to update your API and, if so, what is your process/methodology? Do you export the definition at the time you want to update it, edit it, and regenerate using codegen?

sebastianhaas commented 7 years ago

sebastianhaas/medical-appointment-scheduling contains a shell script to regenerate the definition.

It's really just for playing around, so, as you can see, you need to have swagger-codegen on the specified path and an instance of this server running.

Could you tell me what your are planning to do? Maybe there is a more elegant way. I have done it differently in a few other projects.