-
Notifications
You must be signed in to change notification settings - Fork 8
Closed as not planned
Labels
cliIssue or PR related to the @common-grants/cli libraryIssue or PR related to the @common-grants/cli library
Description
Adding a custom field
User story
As a developer defining a CommonGrants API, I want to add a new custom field with configurable options, so that I can extend the API schema easily.
Developer experience
Simplest use case: Add a custom field by specifying name and type.
cg add field <name> <type>Additional Features
- Provide an example value with
--example. - Add a description using
--description.
Example Usage
# Add a simple custom field
cg add field fundingAmount number
# Add a custom field with an example value
cg add field fundingAmount number --example 100000
# Add a custom field with a description
cg add field fundingAmount number --description "The total amount of funding available"Technical details
- The command should append the new field to the appropriate schema definition in the TypeSpec project.
- If
--exampleor--descriptionis provided, they should be included as metadata in the schema definition.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliIssue or PR related to the @common-grants/cli libraryIssue or PR related to the @common-grants/cli library
Type
Projects
Status
Done