-
Notifications
You must be signed in to change notification settings - Fork 28
add information to the schema if field is required #17
Comments
@crewjam CloudFormation doc seems to have either
In the scraper.go: if span.Text() == "Required" {
property.Required = span.Parent().Text()
property.Required = strings.TrimPrefix(property.Required, "Required: ")
property.Required = regexp.MustCompile("\\s+.*").ReplaceAllString(property.Required, "")
property.Required = strings.TrimSuffix(property.Required, ".")
property.Required = strings.TrimSuffix(property.Required, ":")
} I have no idea how it could be represented in the schema. Some idea
|
Sorry for the delay getting back to you. I noticed that as well when I did some exploration of this issue. I don't exactly have my head around the use case (although a linter seems like it'd be useful), so I'll defer to your judgement, but I think a tri-state enum A PR would be most welcome. :) |
@crewjam Hey I can provide a PR with joy. Do you think that this kind of API would be ok for now? |
That would very nice if you could have information if a property is required. This would a way road for linters based on your library.
If I am not mistaken, *Expr types can be extended with a bool field.
The text was updated successfully, but these errors were encountered: