pub struct OutputOptions {
pub skip_prune: bool,
pub include_tags: Vec<String>,
pub exclude_tags: Vec<String>,
pub include_operation_ids: Vec<String>,
pub exclude_operation_ids: Vec<String>,
pub exclude_schemas: Vec<String>,
pub response_type_suffix: Option<String>,
pub type_name_suffix: Option<String>,
}Expand description
Output tuning options.
Fields§
§skip_prune: boolKeep schemas that are not referenced (no pruning).
Only generate operations tagged with one of these tags (empty = all).
Skip operations tagged with any of these tags.
include_operation_ids: Vec<String>Only generate operations whose operationId is one of these
(empty = all).
exclude_operation_ids: Vec<String>Skip operations whose operationId is one of these.
exclude_schemas: Vec<String>Remove these component schemas from the spec before lowering, so their models are not generated. Filtering runs before pruning. If an excluded schema is still referenced by a retained operation or schema, generation can fail or emit a reference to a type that is not declared.
response_type_suffix: Option<String>Suffix appended to a per-operation response enum’s name (default
Response). Set this to resolve a clash between a generated
<Op>Response enum and a component schema of the same name, mirroring
oapi-codegen’s response-type-suffix.
type_name_suffix: Option<String>Suffix added to the second of two schema names that collapse onto one
Rust identifier. For example, foo-bar and fooBar both become FooBar.
The default is unset. An unset suffix makes such a collision an error,
because the generator will not pick a name for one of two distinct
schemas. Use x-rust-name on the colliding schema first. That extension
marks one schema and records the name the author wants. This option is
for specs with many mechanical collisions, where one annotation per
schema costs too much.
A set suffix must hold at least one letter or digit. Casing removes
punctuation, so a suffix such as - leaves the type name unchanged and
cannot resolve a collision. See crate::lower::type_renames.
Trait Implementations§
Source§impl Clone for OutputOptions
impl Clone for OutputOptions
Source§fn clone(&self) -> OutputOptions
fn clone(&self) -> OutputOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more