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

refactor: centralize json schema generation #212

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chr-hertel
Copy link
Member

@chr-hertel chr-hertel commented Feb 15, 2025

currently not working with custom types in arrays, see MathReasoning -> Step[]

  • re-add PropertyType component
  • more tests
  • strict & non-strict

@chr-hertel chr-hertel force-pushed the refactor-schema-factory branch 2 times, most recently from c838eb5 to e6f1b7c Compare February 15, 2025 00:37
@chr-hertel chr-hertel force-pushed the refactor-schema-factory branch 3 times, most recently from 7c98850 to 2e42f1f Compare February 22, 2025 00:08
@chr-hertel chr-hertel force-pushed the refactor-schema-factory branch from 2e42f1f to 5f39ef1 Compare February 22, 2025 00:16
@@ -213,17 +213,17 @@ final class MyTool
* @param int $number The number of an object
*/
public function __invoke(
#[ToolParameter(pattern: '/([a-z0-1]){5}/')]
#[With(pattern: '/([a-z0-1]){5}/')]
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose to use an extra PR for the renaming to #[With]

Copy link
Contributor

Choose a reason for hiding this comment

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

Besides that, we can also add an internal map, so that you can only use minimum and maximum with an int for example + we can throw an exception if the properties are not typed, or do we already?

Copy link
Member Author

Choose a reason for hiding this comment

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

so just move it first, rename it later you mean?

Copy link
Contributor

@OskarStark OskarStark Feb 25, 2025

Choose a reason for hiding this comment

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

I would rename in a first PR, and see how big this PR still is. It gets messy quite fast when moving and renaming things

Copy link
Contributor

Choose a reason for hiding this comment

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

Updated my comment, in case you missed it

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, should think of getting this smaller anyways, true. Refactoring wasn't as successful as hoped for

use function Symfony\Component\String\u;

/**
* @internal
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

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