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

Improve name generation for Schemas of Eithers with parameterized types #3848

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

kciesielski
Copy link
Member

Fixes #3833

@kciesielski kciesielski marked this pull request as ready for review June 15, 2024 07:10
@kciesielski kciesielski requested a review from adamw June 15, 2024 07:10
@@ -118,4 +118,26 @@ class JsonSchemasTest extends AnyFlatSpec with Matchers with OptionValues with E
// then
result.asJson.deepDropNullValues shouldBe json"""{"$$schema":"http://json-schema.org/draft-04/schema#","title":"Parent","required":["innerChildField"],"type":"object","properties":{"innerChildField":{"$$ref":"#/$$defs/Child"}},"$$defs":{"Child":{"title":"MyChild","type":"object","properties":{"childName":{"type":["string","null"]}}}}}"""
}

it should "Generate correct names for Eithers with parameterized types" in {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this test go to sth like SchemaTest?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I added tests to SchemaTest as well. Still I think it's good keep these to make sure that the "title" field looks good now, as this was the initially reported issue.

@adamw adamw merged commit 16ae14c into master Jun 17, 2024
26 checks passed
@adamw adamw deleted the schema-either branch June 17, 2024 07:55
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.

[BUG] Incorrect Either schema names for HKT params
2 participants