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

Add Rest API to check if a SCL Name isn't already used #204

Closed
dlabordus opened this issue Apr 21, 2022 · 5 comments · Fixed by #294
Closed

Add Rest API to check if a SCL Name isn't already used #204

dlabordus opened this issue Apr 21, 2022 · 5 comments · Fixed by #294
Assignees
Labels
Refinement done Issue is ready for development

Comments

@dlabordus
Copy link
Contributor

As a engineer
I want to have faster feedback when changing/using a SCL Name
So that I can change the name before the add/save returned a error

Background:
Issues #197 and #203 implement check the SCL Name isn't already used during adding/saving of the SCL File.
It would be nice that the front-end can make a call to check this before executing the add/save action.

  • Add a new Rest API Call (Post) to check if a name isn't already used ("/scl/v1/{type}/checkname")
  • It will retrieve the filename are parameter in the Request Body
  • Use this name to make the call the service layer, which make the call to the repository.
  • In the response return true/false to indicate if the name is unique.
@Sander3003
Copy link
Member

After this issue; com-pas/compas-open-scd#147 can be build.

@Sander3003 Sander3003 added the Refinement done Issue is ready for development label Apr 25, 2022
@JakobVogelsang
Copy link

@dlabordus is this issue still valid as it is formulated?

@Sander3003
Copy link
Member

Yes, however it is a low priority issue in my opinion.

@Stef3st Stef3st self-assigned this Dec 13, 2022
@pascalwilbrink
Copy link
Member

@Sander3003, onder welke rechten moet dit vallen?
Als het onder {TYPE}_create valt, kan het zijn dat een update evt fout gaat.
als het onder {TYPE}_update valt, kan het zijn dat een create evt fout gaat.

Lijkt mij persoonlijk het handigst om het onder {TYPE}_read of iets te zetten

@Sander3003
Copy link
Member

{TYPE}_read is fine for me, if the user has insufficient rights, it cannot save the changes to the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refinement done Issue is ready for development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants