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

use human readable type for responses #155

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

southeo
Copy link
Contributor

@southeo southeo commented Nov 29, 2024

we have 2 type fields:

  • @type, which is human-readable
  • ods:fdoType, which is a DOI

For the responses, we need to provide a type to adhere to jsonAPI standards.

{
   "data" : {
      "type" : "ods:DigitalSpecimen",   // This type here
      "attributes" : {
             ...
      }
   }
}

We had some objects that returned fdo types, some that returned human-readable types. Now, we return the human readable for the type. this is because we have some response types (e.g. digitalSpecimenVersions) that don't have an FDO profile.

Jira - back end types should be consistent

@southeo southeo marked this pull request as ready for review November 29, 2024 16:15
samleeflang
samleeflang previously approved these changes Dec 2, 2024
Copy link
Contributor

@samleeflang samleeflang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good clean up, check if this impacts Tom in any way
🧼

import lombok.Getter;

@Getter
public enum FdoType {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this list is final right? This is what we will use when we move to production

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those 2 things aren't the same 😆 It's what we'll use for production though

DATA_MAPPING("https://doi.org/21.T11148/ce794a6f4df42eb7e77e", "ods:DataMapping"),
@JsonProperty("https://doi.org/21.T11148/22e71a0015cbcfba8ffa")
@JsonAlias("ods:MachineAnnotationService")
MAS("https://doi.org/21.T11148/22e71a0015cbcfba8ffa", "ods:MachineAnnotationService"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

sonarcloud bot commented Dec 2, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Condition Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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