Page 1 of 1

[Public] Mod publish API

Posted: Tue Jun 28, 2022 1:11 pm
by vinzenz
This is the last post of this kind for today ;) I just finished documenting the new https://wiki.factorio.com/Mod_publish_API

I'm aware that testing this API can be quite a hassle without a "Delete Mod" button, but I didn't want to delay the release.

Re: [Experimental] Mod publish API

Posted: Thu Jul 07, 2022 10:17 am
by fredthedeadhead
The 'mod publish' API is really great! It was easy for me to set up an deployment task using Gradle.

My one request is that you use OpenAPI (or an alternative, if any exist?) to document the REST APIs. It's nice having a parseable spec that's a consistent format.

I have a question. Instead of versioning the API in the URL, have you considered versioning in the 'media type' header? https://opensource.zalando.com/restful- ... lines/#114 I can recommend it, because it allows for more flexible updating of an API, but it's a very soft suggestion - URL versioning has its own advantages.

Re: [Experimental] Mod publish API

Posted: Wed Jul 13, 2022 8:37 am
by vinzenz
Thank you for the testing the publish API! Yes I'm aware of OpenAPI, but integrating it into the existing codebase takes a bit of work. At least with the new http APIs I did some internal refactoring so maybe in the future I'll get to implementing it. I think I'll stay with the /v2/ prefix for a while. The media type header is maybe something for the /v3/ version in x years :D But maybe then we'll pivot to GraphQL ;)

Re: [Experimental] Mod publish API

Posted: Wed Jul 20, 2022 5:38 pm
by fredthedeadhead
vinzenz wrote: Wed Jul 13, 2022 8:37 am Thank you for the testing the publish API! Yes I'm aware of OpenAPI, but integrating it into the existing codebase takes a bit of work. At least with the new http APIs I did some internal refactoring so maybe in the future I'll get to implementing it.
Even if it's not integrated in the code, publishing an OpenAPI spec would be nice :) I think it would basically replace publishing the specs on the wiki.

Re: [Experimental] Mod publish API

Posted: Wed Jul 20, 2022 6:38 pm
by ptx0
yeah and you should also do a Swagger and API Blueprint and a full Apiary.io demo (/sarcasm) -- or just keep the specs on the wiki like you've always done

Re: [Public] Mod publish API

Posted: Tue Jul 26, 2022 3:33 pm
by vinzenz
I've moved the publish API to the v2 prefix and updated the API docs page. I've decided against merging it with the upload API, because it would make the endpoint to complicated and error-prone.