ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
55 stars 41 forks source link

Add operationId to the OpenAPI spec #172

Closed col closed 1 month ago

col commented 1 month ago

Took a quick look at this and the naive implementation is very simple. This implementation work fine for my use case but I'm not sure how well it would scale to far more complicated API specs.

Is the combination of action name and resource unique? If not, what would make this unique?

Also, if we wanted to allow people to specify the operationId themselves, how would I add an option to the json_api / routes definitions. I'm not really up to speed with the Spark DSL yet.

Contributor checklist

zachdaniel commented 1 month ago

Thank you for the contribution! We can't use action.name in this way, as it's an internal detail (as discussed offline), but this did surface a place where we were exposing the action name incorrectly, much appreciated. I will add a name option to all route entities that will allow setting an operationId