You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 --example or --description is provided, they should be included as metadata in the schema definition.
The text was updated successfully, but these errors were encountered:
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
andtype
.Additional Features
--example
.--description
.Example Usage
Technical details
--example
or--description
is provided, they should be included as metadata in the schema definition.The text was updated successfully, but these errors were encountered: