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
It seems like the .tags top level object only really adds value when the tags are accompanied by the optional description field. I'd suggest we have a method in ApiDescription like addTag(name: String, description: Option<String>, external_docs: Option<String>). In addition it might be useful to protect against typos by adding a method to set the "tag disposition" which would be the cross product of: (any tag name, only specified tag names) x (any number of tags including none, at least one tag, exactly one tag)
Thinking ahead a bit (maybe too far), I expect one would probably centralize the tag configuration. I'm thinking something like:
#[derive(Deserialize)]structTagConfig{allow_other_tags:bool,// whether to allow endpoints to use tags that aren't part of this configendpoint_tag_policy:EndpointTagPolicy,tag_definitions:Vec<TagDefinition>,}#[derive(Deserialize)]enumEndpointTagPolicy{Whatever,AtLeastOne,ExactlyOne,}#[derive(Deserialize)]structTagDefinition{name:String,description:Option<String>,external_docs:Option<String>,}
Consumers like omicron could have a toml file that deserializes to this, and a function that calls the underlying methods on the ApiDescription.
We can defer all this if it seems like too much ceremony or if you think we might want do this differently.
add the high level tags object where the tag name and description exist, this is not being done currently, related to oxidecomputer/omicron#535
The text was updated successfully, but these errors were encountered: