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

plugin: orama schema from json schema #453

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

Conversation

mrbrianevans
Copy link
Contributor

Converts from json schema to orama schema format.

Sorry I didn't see that someone else had already opened a PR until after I'd implemented it.

Closes #445.

Very simple implementation, doesn't resolve references. That can be done by many other packages on npm, this is just to convert from a fully resolved json schema.

Converts from json schema to orama schema format.

Signed-off-by: Brian Evans <ebrian101@gmail.com>
@vercel
Copy link

vercel bot commented Jul 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orama-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2023 2:06pm

properties: {
coOrdinates: {
type: 'array',
items: { type: 'array', items: { type: 'number' } },
Copy link
Collaborator

Choose a reason for hiding this comment

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

This si supported as

{
  coOrdinates: 'number[]'
}

Or I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its a doubly nested array of arrays, data would look like this:

"coOrdinates": [
  [5, 7],
  [8, 3]
]

As far as I know orama doesn't support indexing that, so the converter to JSONschema would throw an error if it was attempted.

@@ -0,0 +1,13 @@
# Nextra Plugin
Copy link
Collaborator

Choose a reason for hiding this comment

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

wrong title

@ilteoood
Copy link
Contributor

@allevo this is a duplicate of #452, just to know: which one would you like to merge?

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.

Support defining a db with jsonschema
3 participants