wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.51k stars 1.18k forks source link

Automatically expose documented API based on the defined Operations #863

Open Martinsos opened 1 year ago

Martinsos commented 1 year ago

We could use Swagger or Openapi for this, or something similar!

It would also make sense to first work more on allowing users to define which API is public, should not change, allow them to customize it, ... , before we let them expose it like this.

Martinsos commented 1 year ago

Btw Rails has an option to print all the routes, maybe that is good first start.

Btw this is also about us promising to not change how routes work without it being a breaking change.

Martinsos commented 1 year ago

Related to #268

Martinsos commented 1 year ago

@breadchris expressed interest in this.

Martinsos commented 1 year ago

NOTE: We are now using superjson for serializing / deserializing RPC calls, so if we will be exposing them as an API, we need to look into making that work with superjson.

Martinsos commented 6 months ago

From some feedback we got, this would help with allowing building mobile and other clients that can then use existing Wasp's backend.

Martinsos commented 6 months ago

Btw they could create their own API by writing their own api declarations and reusing the logic they use in Operations, but that is quite some work and would be much nicer to just be able to get that API for free.

FrancisVarga commented 4 months ago

openapi would be the best since it has newest standard... is there any progress on this?

Martinsos commented 4 months ago

openapi would be the best since it has newest standard... is there any progress on this?

While we will certainly be doing this, we don't yet have a specific date for it, other stuff is being prioritized at the moment! But it will be happening.