Gitea: [Question] is the swagger.json available at a static place?

Created on 20 Oct 2020  路  7Comments  路  Source: go-gitea/gitea

Hopefully this question is welcome. I'd like to generate a golang client for it that's reliable enough to include in my source tree, but have a little hesitation generating from local instances or through the demo site.

I can probably make this work but it'd be nice if you would consider hosting archived versions somewhere.

kinquestion

Most helpful comment

@jolheiser maybe on our API documentation page: https://docs.gitea.io/en-us/api-usage/

All 7 comments

Well, first I'd like to mention

  1. We do have a Go client over at go-sdk
  2. I've also tried to generate based on Swagger, and in all honesty it didn't end up being all that worth it due to a few various problems. My archived repo can be found at gitea-sdk (README)

    • It had some problems with nil values, specifically around dates. This could probably be patched, but it's manual work to remember to do.

    • There are other things detailed in the linked README that didn't quite come out right.

All that being said, you could take a look at my Makefile to see how I did it. Basically you grab the raw template from e.g. master and make sure to remove the parts with {{AppSubUrl}} (since .tmpl refers to it being used as a Go template)

I'm going to close this issue because "archived" versions technically exist via raw content on their specific branch. 馃檪

Thanks for the discussion, appreciate the refs to the sdk! Helps a lot.

oh, one last thing. I couldn't find anywhere where this sdk was documented in the official documentation. I just wanted to let someone know, because it lead to this question!

Hmm, I suppose it isn't directly mentioned in documentation, however there are a few spots that I think could get you there.

Both the CI/CD and Third-party tools pages refer you to awesome-gitea, which has an SDK section.

Perhaps the documentation could link to the SDK section for those interesting in building integrations.

@jolheiser maybe on our API documentation page: https://docs.gitea.io/en-us/api-usage/

@erikh if some things to go-sdk are unclear ... pleace create an issue at https://gitea.com/gitea/go-sdk/issues :)

@6543 thanks! It looks really great so far.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kolargol picture kolargol  路  3Comments

kifirkin picture kifirkin  路  3Comments

haytona picture haytona  路  3Comments

internalfx picture internalfx  路  3Comments

jorise7 picture jorise7  路  3Comments