-
-
Notifications
You must be signed in to change notification settings - Fork 49
feat(arktype): ArkTypeToJsonSchemaConverter #262
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request introduces support for generating OpenAPI specifications from ArkType alongside Valibot. It updates multiple README files to include new package entries, revises documentation to incorporate ArkType converter integration, and adds a completely new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OpenAPIGenerator
participant ArkTypeToJsonSchemaConverter
User->>OpenAPIGenerator: Provide ArkType schema & options
OpenAPIGenerator->>ArkTypeToJsonSchemaConverter: condition(schema)
ArkTypeToJsonSchemaConverter-->>OpenAPIGenerator: Returns true/false
alt condition True
OpenAPIGenerator->>ArkTypeToJsonSchemaConverter: convert(schema, options)
ArkTypeToJsonSchemaConverter-->>OpenAPIGenerator: (required flag, JSON Schema)
OpenAPIGenerator->>User: Return OpenAPI spec
else condition False
OpenAPIGenerator->>User: Skip schema conversion
end
Possibly related PRs
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
More templates
@orpc/arktype
@orpc/client
@orpc/contract
@orpc/openapi
@orpc/openapi-client
@orpc/react-query
@orpc/server
@orpc/shared
@orpc/solid-query
@orpc/standard-server
@orpc/standard-server-node
@orpc/svelte-query
@orpc/valibot
@orpc/standard-server-fetch
@orpc/vue-colada
@orpc/vue-query
@orpc/zod
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (16)
packages/arktype/src/converter.ts (2)
5-15
: Consider adding error handling and additional validationThe implementation works for the happy path but lacks error handling for edge cases. The converter always returns
[true, jsonSchema]
regardless of the schema's properties, and there's no safety check before casting toType
.Consider these improvements:
export class experimental_ArkTypeToJsonSchemaConverter implements ConditionalSchemaConverter { condition(schema: AnySchema | undefined): boolean { return schema !== undefined && schema['~standard'].vendor === 'arktype' } convert(schema: AnySchema | undefined, _options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>] { + if (!this.condition(schema)) { + throw new Error('Schema is not an ArkType schema') + } + const jsonSchema = (schema as Type).toJsonSchema() + + // Handle potential errors from toJsonSchema() + if (!jsonSchema || typeof jsonSchema !== 'object') { + throw new Error('Failed to convert ArkType schema to JSON Schema') + } return [true, jsonSchema] } }Also, if there's a specific reason for always returning
[true, jsonSchema]
(indicating the schema is always required), consider adding a comment explaining this design decision.
10-10
: Consider utilizing SchemaConvertOptionsThe
_options
parameter is currently unused (indicated by the underscore prefix). If there are no plans to use it in the future, this is fine, but consider documenting why or how it might be used in the future.If options will never be used, you could consider adding a brief comment explaining why:
convert(schema: AnySchema | undefined, _options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>] { + // SchemaConvertOptions not used for ArkType schemas as they handle all conversion internally const jsonSchema = (schema as Type).toJsonSchema()
packages/arktype/src/converter.test.ts (1)
1-31
: Tests look good, but could be expanded for better coverage.The test cases cover the basic functionality of
ArkTypeToJsonSchemaConverter
, testing both theconvert
andcondition
methods. The tests verify that the converter correctly handles simple string types and object types, and properly distinguishes between ArkType and Zod schemas.Consider adding additional test cases to improve coverage:
- Test conversion of more complex ArkType schemas (arrays, unions, intersections, etc.)
- Test with output strategy if applicable (
{ strategy: 'output' }
)- Add tests for edge cases and error scenarios
- Test with nested object structures
This would ensure the converter handles all possible ArkType schemas correctly.
packages/standard-server-fetch/README.md (1)
63-64
: New Package Entries Added:
The entries for@orpc/valibot
and@orpc/arktype
have been correctly added with appropriate links and descriptions. As a minor stylistic suggestion, consider varying the introductory phrasing (currently "OpenAPI spec generation from ...") to avoid repetitive sentence starts, which was flagged by static analysis.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
README.md (1)
63-64
: New Package Entries Added:
The additions for@orpc/valibot
and@orpc/arktype
are integrated correctly within the "Packages" section. For enhanced readability, you might consider rephrasing the bullet points slightly to prevent repetitive sentence openings, as indicated by the static analysis hints.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/server/README.md (1)
63-64
: New Package Entries Confirmation:
The "Packages" section now includes the new entries for@orpc/valibot
and@orpc/arktype
with correct links and descriptions. If you wish to address the static analysis suggestion, a slight rewording to differentiate the entries could be beneficial.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/client/README.md (1)
63-64
: New Package Entries Inclusion:
The "Packages" section now properly lists@orpc/valibot
and@orpc/arktype
, ensuring consistency across the documentation. As a minor nitpick, consider varying the starting phrasing in these bullet items to avoid repetitive constructions, as noted by static analysis.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/shared/README.md (1)
68-69
: New Package Entries AddedThe new entries for
@orpc/valibot
and@orpc/arktype
clearly communicate their purpose as tools for OpenAPI spec generation from Valibot and ArkType respectively. One minor stylistic suggestion: consider varying the sentence openings to avoid repetitive phrasing as flagged by static analysis.🧰 Tools
🪛 LanguageTool
[style] ~68-~68: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~69-~69: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/openapi-client/README.md (1)
63-64
: Enhanced Documentation for OpenAPI Spec ToolsThe documentation now includes entries for
@orpc/valibot
and@orpc/arktype
. These additions help users quickly identify the new OpenAPI spec generation capabilities. Just a small note—the phrase structure in these two lines is very similar; consider rewording one of them to improve readability.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/openapi/README.md (1)
63-64
: Updated Package List with New EntriesThe additions for
@orpc/valibot
and@orpc/arktype
provide concise descriptions of their roles in generating OpenAPI specifications. To enhance clarity and maintain variety in tone, you might consider modifying the repetitive sentence structure noted by static analysis.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/standard-server/README.md (1)
63-64
: New Documentation Updates for Server PackagesThe updated "Packages" section now features
@orpc/valibot
and@orpc/arktype
with succinct descriptions. As with other files, there is an opportunity to diversify the sentence structure to improve the overall style and readability of the documentation.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/vue-query/README.md (1)
63-64
: Addition of New OpenAPI Spec Generation ToolsThe README now lists
@orpc/valibot
and@orpc/arktype
as part of the available packages. This update aligns well with the broader documentation updates across the repo. A minor improvement would be to vary the sentence openings in these lines to avoid the repetition flagged by static analysis, which will further polish the document’s tone.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/vue-colada/README.md (1)
63-64
: Enhance Documentation Clarity for New Package Entries.The new bullet points for
@orpc/valibot
and@orpc/arktype
accurately reflect their functionality. However, both descriptions begin with similar phrasing. For improved readability, consider rewording at least one of the entries to avoid repetitive sentence starts.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/standard-server-node/README.md (1)
63-64
: Ensure Consistency and Readability in Package Listings.The additions for
@orpc/valibot
and@orpc/arktype
are correct and consistent with the overall documentation. A minor suggestion is to vary the introductory phrasing between these bullet items to reduce redundancy and enhance clarity.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/svelte-query/README.md (1)
63-64
: Refine Wording for New Package Entries.The recently added entries for
@orpc/valibot
and@orpc/arktype
clearly document their purpose. To further improve readability, consider slight rephrasing so that each bullet point starts with a unique tone.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/arktype/README.md (1)
51-65
: Minor Style Improvement Suggestion
Several sentences in the packages and features sections (e.g., the listing of supported integrations) begin with very similar wording. While this isn’t a blocker, rephrasing some of these lines could improve readability and make the documentation flow even better.🧰 Tools
🪛 LanguageTool
[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... your API or implement API contract. - [@orpc/client](https://www.npmjs.com/package/@...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... API on the client with type-safety. - [@orpc/react-query](https://www.npmjs.com/pack...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/react/overview). - [@orpc/vue-query](https://www.npmjs.com/packag...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...latest/docs/framework/vue/overview). - [@orpc/solid-query](https://www.npmjs.com/pack...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/solid/overview). - [@orpc/svelte-query](https://www.npmjs.com/pac...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...est/docs/framework/svelte/overview). - [@orpc/vue-colada](https://www.npmjs.com/packa...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[misspelling] ~60-~60: Possible spelling mistakes found.
Context: ...ge/@orpc/vue-colada): Integration with Pinia Colada. - [@or...(EN_MULTITOKEN_SPELLING_TWO)
[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ada](https://pinia-colada.esm.dev/). - [@orpc/openapi](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~62-~62: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...I specs and handle OpenAPI requests. - [@orpc/zod](https://www.npmjs.com/package/@orp...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (25)
README.md
(1 hunks)apps/content/docs/openapi/openapi-specification.md
(4 hunks)packages/arktype/.gitignore
(1 hunks)packages/arktype/README.md
(1 hunks)packages/arktype/package.json
(1 hunks)packages/arktype/src/converter.test.ts
(1 hunks)packages/arktype/src/converter.ts
(1 hunks)packages/arktype/src/index.ts
(1 hunks)packages/arktype/tsconfig.json
(1 hunks)packages/client/README.md
(1 hunks)packages/contract/README.md
(1 hunks)packages/openapi-client/README.md
(1 hunks)packages/openapi/README.md
(1 hunks)packages/react-query/README.md
(1 hunks)packages/server/README.md
(1 hunks)packages/shared/README.md
(1 hunks)packages/solid-query/README.md
(1 hunks)packages/standard-server-fetch/README.md
(1 hunks)packages/standard-server-node/README.md
(1 hunks)packages/standard-server/README.md
(1 hunks)packages/svelte-query/README.md
(1 hunks)packages/valibot/README.md
(1 hunks)packages/vue-colada/README.md
(1 hunks)packages/vue-query/README.md
(1 hunks)packages/zod/README.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/zod/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/solid-query/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/shared/README.md
[style] ~68-~68: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~69-~69: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/valibot/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/server/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/contract/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/client/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/standard-server-fetch/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/react-query/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/openapi-client/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/standard-server/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/openapi/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/standard-server-node/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/vue-colada/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/arktype/README.md
[misspelling] ~35-~35: Possible spelling mistakes found.
Context: ...tack Query (React, Vue, Solid, Svelte), Pinia Colada, and more. - Server Actions ⚡️: Ful...
(EN_MULTITOKEN_SPELLING_TWO)
[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... your API or implement API contract. - [@orpc/client](https://www.npmjs.com/package/@...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... API on the client with type-safety. - [@orpc/react-query](https://www.npmjs.com/pack...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/react/overview). - [@orpc/vue-query](https://www.npmjs.com/packag...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...latest/docs/framework/vue/overview). - [@orpc/solid-query](https://www.npmjs.com/pack...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/solid/overview). - [@orpc/svelte-query](https://www.npmjs.com/pac...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...est/docs/framework/svelte/overview). - [@orpc/vue-colada](https://www.npmjs.com/packa...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[misspelling] ~60-~60: Possible spelling mistakes found.
Context: ...ge/@orpc/vue-colada): Integration with Pinia Colada. - [@or...
(EN_MULTITOKEN_SPELLING_TWO)
[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ada](https://pinia-colada.esm.dev/). - [@orpc/openapi](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~62-~62: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...I specs and handle OpenAPI requests. - [@orpc/zod](https://www.npmjs.com/package/@orp...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/svelte-query/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/vue-query/README.md
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (14)
packages/arktype/src/index.ts (1)
1-1
: Export looks good!Clean and straightforward export statement that makes the converter accessible through the package's root.
packages/solid-query/README.md (1)
63-64
: Documentation updates look good!The additions to the packages list are well-formatted and consistent with the existing entries. They provide useful links to both the npm packages and the official documentation sites.
🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/zod/README.md (1)
63-64
: Documentation updates look good!The additions to the packages list are well-formatted and consistent with the existing entries, providing clear information about the new packages' purposes.
🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/arktype/src/converter.ts (1)
1-4
: Import statements look good!The imports are correctly typed and bring in all the necessary types from the required packages.
packages/contract/README.md (1)
63-64
: LGTM! Added new package entries for Valibot and ArkType.The additions of
@orpc/valibot
and@orpc/arktype
packages to the documentation are clear and consistent with the PR's objective of introducing ArkType support alongside Valibot.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/valibot/README.md (1)
63-64
: LGTM! Added new package entries for Valibot and ArkType.The additions of
@orpc/valibot
and@orpc/arktype
packages to the documentation are clear and consistent with the PR's objective of introducing ArkType support alongside Valibot.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/react-query/README.md (1)
63-64
: LGTM! Added new package entries for Valibot and ArkType.The additions of
@orpc/valibot
and@orpc/arktype
packages to the documentation are clear and consistent with the PR's objective of introducing ArkType support alongside Valibot.🧰 Tools
🪛 LanguageTool
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
packages/arktype/.gitignore (1)
1-26
: New .gitignore File Added:
The file provides a well-structured set of ignore rules covering hidden files, common generated folders, and typical build artifacts. This configuration should help maintain a clean repository state.packages/arktype/tsconfig.json (1)
1-21
: TSConfig Setup Looks Correct.The new
tsconfig.json
properly extends the base configuration, sets therootDir
correctly, and includes necessary project references along with appropriate include and exclude patterns.packages/svelte-query/README.md (1)
70-110
: Sample Code Block is Informative.The example code provided demonstrates how to use query, infinite query, and mutation hooks effectively. This illustrative snippet aids in understanding the integration with Svelte Query.
packages/arktype/package.json (2)
1-24
: Package Metadata Looks Good.The package metadata for
@orpc/arktype
is comprehensive, covering essential fields such as the package name, type, version, license, homepage, repository details, keywords, and dependency settings.
28-46
: Remaining Package Settings are Correct.Other settings such as
scripts
,peerDependencies
, anddependencies
are appropriately defined to support the package's build and usage workflows.apps/content/docs/openapi/openapi-specification.md (2)
38-40
: New ArkType Integration Notice
The updated paragraph now includes ArkType alongside Zod and Valibot. This is a clear and useful enhancement that informs users about the new supported schema library. Ensure that you also clarify (if needed) the experimental nature of ArkType in the documentation.
49-60
: Converter Imports & Schema Converters Setup
The import statements correctly bring in both the Valibot and ArkType converters from their respective packages, and theOpenAPIGenerator
setup correctly includesnew ArkTypeToJsonSchemaConverter()
in the schemaConverters array. Double-check that the naming conventions and module paths remain consistent with other parts of the codebase.
"exports": { | ||
".": "./src/index.ts" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the Exports Configuration.
The "exports"
field currently points to "./src/index.ts"
, but only the dist
directory is published (as defined in the "files"
array). This mismatch might lead to runtime issues for consumers expecting compiled code. Consider updating the "exports"
field to reference the built output. For example:
- "exports": {
- ".": "./src/index.ts"
- },
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.mts",
+ "import": "./dist/index.mjs",
+ "default": "./dist/index.mjs"
+ }
+ },
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"exports": { | |
".": "./src/index.ts" | |
}, | |
"exports": { | |
".": { | |
"types": "./dist/index.d.mts", | |
"import": "./dist/index.mjs", | |
"default": "./dist/index.mjs" | |
} | |
}, |
packages/arktype/README.md
Outdated
import { OpenAPIGenerator } from '@orpc/openapi' | ||
import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/valibot' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix Import Error in Code Sample
The code snippet for generating the OpenAPI spec incorrectly imports experimental_ArkTypeToJsonSchemaConverter
from @orpc/valibot
. Since this README is for the @orpc/arktype
package, the converter should be imported from @orpc/arktype
. Please update the import as follows:
- import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/valibot'
+ import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/arktype'
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import { OpenAPIGenerator } from '@orpc/openapi' | |
import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/valibot' | |
import { OpenAPIGenerator } from '@orpc/openapi' | |
import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/arktype' |
Summary by CodeRabbit
New Features
Documentation
@orpc/valibot
and@orpc/arktype
in multiple README files, expanding the list of available packages for OpenAPI specification generation.