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

[opensearch_client] Migrate schemas to pydantic #106

Open
simskij opened this issue Sep 18, 2023 · 0 comments
Open

[opensearch_client] Migrate schemas to pydantic #106

simskij opened this issue Sep 18, 2023 · 0 comments

Comments

@simskij
Copy link
Member

simskij commented Sep 18, 2023

Upon some closer investigation, I noticed that this interface is still using JSON schema only. I suggest you have a stab at implementing the schema with pydantic before we merge this as this will likely uncover things you might like to change.

One change that comes to mind just by reading the spec is that secret_fields is a space-delimited string rather than a string array. I would change this for multiple reasons:

  • Easier to work with (with pydantic deserialization, that is)
  • And probably more importantly, JSON allows spaces in object keys, which could potentially become a problem 😝.

(and sorry for this becoming so long-lived, but I do think this is important enough to stall)

Originally posted by @simskij in #99 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants