medical-appointment-scheduling-server icon indicating copy to clipboard operation
medical-appointment-scheduling-server copied to clipboard

Swagger Definition?

Open senften opened this issue 7 years ago • 3 comments

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.

senften avatar Feb 28 '17 16:02 senften

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. :)

sebastianhaas avatar Mar 02 '17 00:03 sebastianhaas

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?

senften avatar Mar 02 '17 16:03 senften

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.

sebastianhaas avatar Mar 03 '17 12:03 sebastianhaas