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

[FCFIELDS-44] - PUT /custom-fields does not handle multiple entity types #41

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

alb3rtino
Copy link
Contributor

@alb3rtino alb3rtino commented Dec 5, 2023

Purpose

This PR resolves the issue FCFIELDS-44 where the PUT /custom-fields endpoint was unable to handle different entityTypes.

Approach

To address this issue, a required attribute called entityType has been added to the PutCustomFieldCollection schema. This change mandates clients to include the entityType when updating custom fields using the PUT /custom-fields endpoint. With this addition, the implementation can now update custom fields specifically for a certain entityType without affecting others.

TODOs and Open Questions

  • Use GitHub checklists. When solved, check the box and explain the answer.
  • Check logging.

Additional Actions

This is a breaking change. Client implementations will require adjustments to include the entityType when making PUT requests to /custom-fields.

all custom fields in PUT /custom-fields requests should contain the same entityType
PUT on /custom-fields expects a PutCustomFieldCollection
@alb3rtino alb3rtino requested a review from a team as a code owner December 5, 2023 17:34
Copy link

sonarqubecloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

95.8% 95.8% Coverage
0.0% 0.0% Duplication

"metadata": {
"description": "User metadata information",
"$ref": "raml-util/schemas/metadata.schema",
"readonly": true
}
},
"required": [
"customFields"
"customFields",
"entityType"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change. If any other module uses this API and is not providing entity type will be a problem. Please check impacted modules due to this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, I've detailed this in the description. The application and interface versions have been bumped to signify this change. No module should be affected by this modification unless it explicitly updates its folio-custom-fields dependency.

However, mod-users will require such an update once the related frontend work is merged. This is tracked over in STSMACOM PR#1417.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I approve the PR

"metadata": {
"description": "User metadata information",
"$ref": "raml-util/schemas/metadata.schema",
"readonly": true
}
},
"required": [
"customFields"
"customFields",
"entityType"
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I approve the PR

@alb3rtino alb3rtino requested a review from a team December 7, 2023 08:11
@alb3rtino
Copy link
Contributor Author

@folio-org/volaris-backend Any chance I can get another review on this so things can move forward?

@alb3rtino alb3rtino merged commit e3c95f1 into master Dec 11, 2023
5 checks passed
@alb3rtino alb3rtino deleted the FCFIELDS-44 branch December 11, 2023 21:26
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.

3 participants