8000 refactor: cleaner peri integration by zoedsoupe · Pull Request #137 · cloudwalk/hermes-mcp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: cleaner peri integration #137

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

Merged
merged 2 commits into from
Jun 23, 2025
Merged

Conversation

zoedsoupe
Copy link
Collaborator

Problem

The current server component schema definition syntax is verbose and inconsistent. Required fields need to be wrapped with
{:required, type} which makes the schema harder to read and maintain. Additionally, the schema system lacks built-in support for
date/time types, requiring manual string validation.

Solution

This PR introduces a cleaner Peri integration with two key improvements:

  1. Simplified required field syntax: Added a required: true option to the field macro, eliminating the need for {:required,
    type} wrapping
  2. Native date/time type support: Added automatic validation and parsing for :date, :time, :datetime, and :naive_datetime types
    that convert ISO 8601 strings to Elixir structs

Rationale

The changes improve developer experience by:

  • Making schemas more readable and consistent with typical Elixir DSL patterns
  • Reducing boilerplate code when defining required fields
  • Providing type safety for temporal data without manual validation
  • Maintaining backward compatibility with existing {:required, type} syntax
  • Aligning with JSON Schema standards for date/time formats

Close #123

@zoedsoupe zoedsoupe merged commit 43226cc into main Jun 23, 2025
4 checks passed
@zoedsoupe zoedsoupe deleted the refactor/cleaner-peri-integration branch June 23, 2025 00:29
zoedsoupe pushed a commit that referenced this pull request Jun 23, 2025
🚀 Want to release this?
---


##
[0.10.2](v0.10.1...v0.10.2)
(2025-06-23)


### Bug Fixes

* default implementation for server handle_notification
([#135](#135))
([c958041](c958041))


### Code Refactoring

* cleaner peri integration
([#137](#137))
([43226cc](43226cc)),
closes [#123](#123)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: cloudwalk-actions[bot] <156226953+cloudwalk-actions[bot]@users.noreply.github.com>
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.

[Server] Support peri schema of non-JSON types
1 participant
0