canonical / canonical/pydantic-kitbash
Quotes are always stripped from example string values
Open
- Dominant language
- Python
- Stars
- 3
- Forks
- 2
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 9
Description
PyYAML's dumper strips quotes from string values regardless of how they are passed in.
Consider the following field:
```python
myField: str = pydantic.Field(
examples=["one", "\"two\""],
)
```
Despite the escaped quotes in the second example, the examples section of this field's kitbash entry would render as:
**Examples**
```yaml
myField: one
```
```yaml
myField: two
```
I would like Kitbash to be less opinionated about how string values are formatted as YAML, as there are cases where keys should be enclosed in quotes for safety (e.g., version strings).
Contributor guide
Assessment
This issue has not been assessed yet.