Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let AshJsonApi generate OpenAPI spec #562

Conversation

davidebriani
Copy link
Collaborator

Currently, a custom spec/0 is defined on the EdgehogWeb.AdminAPI module where AshJsonApi is used.
The function helps generating the OpenAPI spec and supports the Mix tasks from OpenApiSpex to generate OpenAPI spec files via CLI.

Instead of manually defining the spec/0 function, AshJsonApi introduced support for having the function already defined out of the box: ash-project/ash_json_api#200

This PR thus updates AshJsonApi dependency and rely on AshJsonApi's native implementation.

Update dependencies related to Ash and AshJsonApi

A unit test is changed to accomodate the new error format from
AshJsonApi.

Signed-off-by: Davide Briani <davide.briani@secomind.com>
Since it is now supported, use AshJsonApi options to configure the
OpenAPI spec and use the `spec` function now directly exposed by
AshJsonApi.

Signed-off-by: Davide Briani <davide.briani@secomind.com>
@davidebriani davidebriani requested a review from rbino July 5, 2024 17:34
@rbino rbino merged commit cbc94d6 into edgehog-device-manager:from-ash-we-rise Jul 8, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants