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

New API end point for checking existence of IATI identifiers in the Datastore #374

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

simon-20
Copy link
Contributor

…atastore

@ghost
Copy link

ghost commented Feb 16, 2024

In the GitHub workflows, does the new variable also need to be in Azure/appservice-settings stage?

@ghost
Copy link

ghost commented Feb 16, 2024

In terms of what the API returns

a) around iati_identifiers_found, it returns {"ID":COUNT, ...} at the moment. How about {"ID":{"count":COUNT}, ...}? I'm just thinking this makes it easy for us to add additional data elements later without having to break backwards compatibility.

b) having a iati_identifiers_not_found could be good too - we talked before about how it could say if the prefix is at least valid or not. However, at the moment I think the value would just be {} so maybe it's fine to leave it and we can look later.

I guess the other approach is to put them all in one key, iati_identifiers with extra info on whether it was found or not. eg {"ID":{found: True, count:0}, "ID":{found:False, prefix_valid: True} but I think I like this one:

  • it's easy to write checking code like if id in data['iati_identifiers_found'].keys() without having to check the extra found key.
  • This way we can have different definitions for the dictionary of info that is got on found and not found id's

Updated the list of found identifiers to be a dictionary, to allow additional information to be returned. Included dictionary of identifiers not found. Added more tests to check handling of special characters.
@simon-20 simon-20 merged commit 770eeee into develop Mar 13, 2024
2 checks passed
@simon-20 simon-20 deleted the iati_identifier_exist_api_call branch March 13, 2024 12:24
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