Golan2072 / CLGen

Cepheus Light RPG character generator
7 stars 4 forks source link

API access. Swagger return. #7

Open jjaquinta opened 3 years ago

jjaquinta commented 3 years ago

I've added in API access to your logic on the /api/chargen URL. It returns the character in JSON. The format of the JSON and the path to it is defined in the api.swagger doc. I also made the api self documenting. When you browse to /api it returns to you the swagger. You can cut and paste this into editor.swagger.io, or open the URL from that site directly to view pretty documentation for the API, and generate stubs to call it in many languages.

Golan2072 commented 3 years ago

Many thanks! Will try that out later today.

jjaquinta commented 3 years ago

If I've got the pull request thing right, I'll start looking at making the radio button sticky, and adding in things like career choice if you are moving on to subsector generation.

Golan2072 commented 3 years ago

Yes, you got it right. The functionality I want to add is:

jjaquinta commented 3 years ago

So I've got an update for sticky radio buttons. It's unclear to me if it added it to the existing pull request, or how I create a new pull request when this one hasn't been merged. If you are OK with the API additions, can you merge? Then it will be clear if I have to do another one for the sticky radio buttons.

jjaquinta commented 3 years ago

Yeah, I did another update for career choice, and now I see conflicts. I'll hold off until we get the merge sequence sorted out.

Golan2072 commented 3 years ago

Thanks!