How to use the Swagger Editor to design your API (or to create an API specification)

Use the Insert menu to create/generate misc API specification Items:

Also, watch some training videos such as:

https://www.youtube.com/watch?v=7MS1Z_1c5CU

Example use of the menu shown above to design your API:

You can use the above approaches or the approach below:

To keep things simple, you can just go therehttps://editor.swagger.io/   (make sure to use expand/collapse to see what I am saying below)

You will see an editor with an API specification for a Pet store. You can just reuse this API specification and add your specification on top of that.

One simple approach can be: think about every single object (data) that you want the users to be able to access through your API, you create a path for each such object. For each such object, you can create paths/subpaths as the following image is showing. Here Pet, store, and user are the objects. there are multiple paths for an object such as user, user/login, user/logout or /pet, /pet/{petID}.

Then you see under the path /pet : some REST verbs

The for example under post (if you expand post), you see: (some stuff, you need to know/understand, otherwise you can just follow their style)

You can do such for all object paths (for your application), additional paths for objects, and for inside object REST verbs.