To use this blueprint, add code inside {{cookiecutter.component_id}}
You can use placeholders to use valued provided by users.
Refer to cookiecutter for documentation.
Runway provides the following fields by default to all blueprints.
component_id
- REQUIRED this will be used as the name of the repository and can be used for any other purpose in your blueprint. Do not remove this from thecookiecutter.json
filedescription
- REQUIRED this will be used as the description of the repository and can be used for any other purpose in your blueprint. Do not remove this from thecookiecutter.json
fileowner
- this field is not used unless you need it in the blueprint. It will provide the blueprint the employee number of the user that created the project.
If you need values from users, add them in cookiecutter.json with a default value.
You can also customize the look and feel of the blueprint in Runway by adding a template.json
file in the blueprint repo. This allows you to provide an alternative display name for the blueprint and it's fields.
Example:
display_name: "My pretty display",
fields:
my_ugly_field_name:
display_name: "My pretty display name"
You can also add simple validation to your fields by setting if the field is required with the required
attribute as well as specifying other checks with the validations
attribute. validations
accepts a list of validators. For each of the validators you will also need to provide message to be shown to the user with the attribute helper_text
a type
of validation and for regex validators you will also need to provide a matcher
. At this time only regex
validators are supported but more will be added.
Example:
fields:
field_name:
display_name: "Field display name"
type: "string"
required: true
validations:
- type: "regex"
matcher: "^[a-z][a-z-0-9]+[a-z0-9]$"
helper_text: "Lowercase letter, numbers and hyphens only"
For examples, you can look at:
You can test your blueprint by:
- pushing your changes to this repo:
- navigate to https://developer.aa.com/create/AA/testIssue1549
While testing your blueprint with runway is quick and easy, you can get a quicker feedback loop by testing your blueprint locally.
- Download and install python 3
- Install cookiecutter
- clone this repository
- run cookiecutter:
cookiecutter .
Once your blueprint works the way you want, you may want to publish your blueprint so it shows in runway and other people can use it.
- Add the "runway-template" topic to this repository.
- Make sure your blueprint shows in runway as a community blueprint