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: ♻️ refine JSON schema typing and processing #918

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Dec 5, 2024

Fix for #913


  • 🔄 JSONSchemaType now includes null
  • 👼 Introducing a new interface JSONSchemaDescripted for common properties like description
  • 🦄 New interface JSONSchemaAnyOf allows complex schemas to be defined using the anyOf keyword, enabling more flexibility in what types can be accepted
  • 💡 Enhanced JSONSchemaString, JSONSchemaNumber, JSONSchemaBoolean, and JSONSchemaObject by extending them from JSONSchemaDescripted, which now includes a common description property with an optional type

generated by pr-describe

Copy link

github-actions bot commented Dec 5, 2024

Investigator report

generated by gai

Copy link

github-actions bot commented Dec 5, 2024

LGTM 🚀

The changes in the pull request look reasonable and well-structured. The addition of JSONSchemaAnyOf and other refinements to existing interfaces seem to be addressing common patterns in JSON Schema definitions. The restructuring helps in maintaining a cleaner and more scalable schema definition system.

Here's a brief summary of the key changes:

  1. Introduction of JSONSchemaAnyOf: This allows specifying schemas that can match any one of several alternatives, enhancing the flexibility of schema definitions.
  2. Enhancements to Existing Interfaces: The introduction of JSONSchemaDescripted and its extension into other interfaces (JSONSchemaString, JSONSchemaNumber, JSONSchemaBoolean, and JSONSchemaObject) ensures that all schema components can include a description field.

These changes should help in building more robust and maintainable JSON Schema definitions, making it easier to handle complex data structures.

If there are any further questions or additional changes required, feel free to let me know! 🤝

generated by pr-review

@pelikhan pelikhan merged commit 26dfeae into main Dec 5, 2024
9 checks passed
@pelikhan pelikhan deleted the anyof branch December 5, 2024 21:37
Copy link

github-actions bot commented Dec 5, 2024

<|im_start|>

generated by github-agent

Copy link

github-actions bot commented Dec 5, 2024

{
  "runs": [
    {
      "run_id": 12187858738,
      "job_name": "genai investigator",
      "status": "",
      "conclusion": null,
      "head_sha": "90170a1471ba837aab24c634090089efb172d563"
    },
    {
      "run_id": 12187845078,
      "job_name": "ollama smoke tests",
      "status": "success",
      "conclusion": null,
      "head_sha": "18eaac168f27454a7cb3e7f6986bec36e8c815b6"
    },
    {
      "run_id": 12187845068,
      "job_name": "playwright smoke tests",
      "status": "success",
      "conclusion": null,
      "head_sha": "18eaac168f27454a7cb3e7f6986bec36e8c815b6"
    },
    {
      "run_id": 12187845079,
      "job_name": "build",
      "status": "success",
      "conclusion": null,
      "head_sha": "18eaac168f27454a7cb3e7f6986bec36e8c815b6"
    },
    {
      "run_id": 12187845090,
      "job_name": "genai pull request commit review",
      "status": "success",
      "conclusion": null,
      "head_sha": "18eaac168f27454a7cb3e7f6986bec36e8c815b6"
    },
    {
      "run_id": 12187844589,
      "job_name": "PR #918",
      "status": "success",
      "conclusion": null,
      "head_sha": "18eaac168f27454a7cb3e7f6986bec36e8c815b6"
    },
    {
      "run_id": 12187828346,
      "job_name": "genai pull request commit review",
      "status": "success",
      "conclusion": null,
      "head_sha": "49e9d3c0f70784449fa42992bcd5aed33d179e53"
    },
    {
      "run_id": 12187828339,
      "job_name": "playwright smoke tests",
      "status": "cancelled",
      "conclusion": null,
      "head_sha": "49e9d3c0f70784449fa42992bcd5aed33d179e53"
    },
    {
      "run_id": 12187828338,
      "job_name": "build",
      "status": "failure",
      "conclusion": null,
      "head_sha": "49e9d3c0f70784449fa42992bcd5aed33d179e53"
    },
    {
      "run_id": 12187828332,
      "job_name": "ollama smoke tests",
      "status": "cancelled",
      "conclusion": null,
      "head_sha": "49e9d3c0f70784449fa42992bcd5aed33d179e53"
    },
    {
      "run_id": 12187827927,
      "job_name": "PR #918",
      "status": "success",
      "conclusion": null,
      "head_sha": "49e9d3c0f70784449fa42992bcd5aed33d179e53"
    },
    {
      "run_id": 12187798898,
      "job_name": "genai pull request commit review",
      "status": "success",
      "conclusion": null,
      "head_sha": "49e9d3c0f70784449fa42992bcd5aed33d179e53"
    },
    {
      "run_id": 12187798998,
      "job_name": "GitHub Actions workflow",
      "status": "completed",
      "conclusion": "success",
      "head_sha": "62ffc9ac07c045ecbde31a23d5e9bebaabc04fe8"
    }
  ]
}

generated by github-one

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.

1 participant