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

CDPS-1086: Dependency bumps and fixing subsequent issues #8

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

brightonsbox
Copy link
Contributor

No description provided.

)
val foodAllergies: Nullish<List<String>> = getAttributeAsNullish<List<String>>(attributes, "foodAllergies")
@field:NullishReferenceDataCodeList(domains = ["FOOD_ALLERGY"])
@JsonIgnore
Copy link
Contributor Author

@brightonsbox brightonsbox Jan 20, 2025

Choose a reason for hiding this comment

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

Jackson update changed the way that it was handling Nullish... which meant that I now needed to @JsonIgnore these fields... which then has a knock on impact that the OpenAPI schema is then ignored... (annoyingly for us, there's no way of forcing OpenAPI to ignore an @JsonIgnore https://github.com/springdoc/springdoc-openapi/blob/main/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocAnnotationsUtils.java#L91).

@@ -19,7 +19,7 @@ import java.time.ZonedDateTime
class FieldHistory(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val fieldHistoryId: Long = -1,
val fieldHistoryId: Long = 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

JPA changed how it was handling unpersisted entities... suddenly you're not allowed to have a default value of -1 anymore to identify something not persisted 🤷

@@ -84,7 +83,8 @@ class OpenApiConfiguration(
val properties = schema.properties ?: mutableMapOf()
for (propertyName in properties.keys) {
val propertySchema = properties[propertyName]!!
if (propertySchema is DateTimeSchema) {

if (propertySchema.format == "date-time") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

OpenAPI changes also broke this, now having to check the format instead...

@brightonsbox brightonsbox merged commit fa003b4 into main Jan 23, 2025
8 checks passed
@brightonsbox brightonsbox deleted the jb/CDPS-1086-deps branch January 23, 2025 11:12
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