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

[feat] GET /services implementation #43

Closed
4 tasks done
lgrd opened this issue Mar 8, 2023 · 6 comments · Fixed by #46
Closed
4 tasks done

[feat] GET /services implementation #43

lgrd opened this issue Mar 8, 2023 · 6 comments · Fixed by #46
Assignees
Labels
enhancement New feature or request

Comments

@lgrd
Copy link
Collaborator

lgrd commented Mar 8, 2023

Create GET /services like it is specified inside https://github.com/IGNF/road2/blob/develop/documentation/apis/administration/1.0.0/api.yaml.

  • Code it (see next paragrah)
  • Update doc (ex. functionalities, changelog)
  • Update tests (new classes if there are; rtest for this route)
  • Run tests inside docker (rtest, ctest, utest, itest)

Code

  • Add the route inside the router of admin/1.0.0 (no need of an interface I think... only if we want to add some parameters. But we could add this later to me)
  • Create a function getServicesConfigurations() inside administrator.js to handle the request and to get all the information. Everything is in this._configuration of the administrator instance (this._configuration is the content of road2.json) :
    • Id is in the config of the admin (aka road2.json)
    • the rest is the content of the config file of the service (aka service.json)
@lgrd lgrd added the enhancement New feature or request label Mar 8, 2023
@jmkerloch
Copy link
Contributor

For the result of the service configuration, we can read the content of configuration file ? We don't need to get it from the service instance ?

@lgrd
Copy link
Collaborator Author

lgrd commented Mar 10, 2023

Yes, you can read it ;) I think you don't have to ask anything to the service.

@jmkerloch
Copy link
Contributor

@lgrd There is a parameter withId in the API description.

Should I only check the presence of the parameter or the value must be stricly equal to 'true' or 'false' and return an error in this case ?

@jmkerloch
Copy link
Contributor

@lgrd What should be the default value for withId ?

@lgrd
Copy link
Collaborator Author

lgrd commented Mar 10, 2023

Oh ! I think there is a mistake here... withId is no longer used... because you have the id in the answer. Maybe we could imagine a onlyId... but that is another feature. Can you delete this parameter inside the openapi yaml ?

@jmkerloch
Copy link
Contributor

Ok I will change the openapi yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants