How should we represent argument types? #11
Replies: 7 comments 11 replies
-
|
@mdonnalley this could be useful to ease the usage of CLIs built with oclif by AI agents. You can help defining the standard using oclif's well rounded model. Then you can create |
Beta Was this translation helpful? Give feedback.
-
|
@AllanOricil answered here: oclif/oclif#1806 (comment) |
Beta Was this translation helpful? Give feedback.
-
|
Love the initiative! 🤗 It would be quite valuable to support argument types to automate parsing from the specs to a strongly typed language. I would think that having a default
In case of list arguments e.g. separated by Should cover most of the usecases and things can be expanded further in minor versions. |
Beta Was this translation helpful? Give feedback.
-
|
Perhaps with JSON Schema as OpenAPI do? |
Beta Was this translation helpful? Give feedback.
-
|
Here is an initial proposal. I've aimed to keep the functionality minimal while still ensuring usability. Primitive types
Additional type-specific keywords can be used to refine the data type, for example, limit the string length or specify a maximum value for an integer. An optional Schema
FormatsInteger
Float
String
|
Beta Was this translation helpful? Give feedback.
-
|
Whether a file is input/output, directory/file, and file type are concerns that are useful for autocompletion system, for example. |
Beta Was this translation helpful? Give feedback.
-
|
For practical reasons, I think it makes sense to use exactly the data types and formats from the JSON schema version used to express the OpenCLI format ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions