pub struct FieldOpenApi {
pub name: String,
pub description: String,
pub example: String,
pub pattern: String,
pub min_length: i32,
pub max_length: i32,
pub min_items: i32,
pub max_items: i32,
pub required: bool,
pub identifier: bool,
pub format: String,
}
Expand description
FieldOpenAPI is a message used to annotate fields within gRPC message types with additional OpenAPI-specific metadata. This includes field descriptions, examples, validation patterns, length constraints, and other properties.
Fields§
§name: String
Used for renaming field in OpenAPI schema.
description: String
Description of the field. Defaults to the field name.
example: String
A free-form property to include a JSON example of this field. This is copied to generated schema. Quotes must be escaped.
pattern: String
Regex pattern the field value should match.
min_length: i32
Minimum length for string fields. Defaults to 1.
max_length: i32
Maximum length for string fields. Defaults to 4096.
min_items: i32
Minimum number of items for repeated fields. Defaults to 1.
max_items: i32
Maximum number of items for repeated fields. Defaults to 4096.
required: bool
Indicates if the field is required.
identifier: bool
Indicates if the field is an identifier.
format: String
Format of the field.
Trait Implementations§
source§impl Clone for FieldOpenApi
impl Clone for FieldOpenApi
source§fn clone(&self) -> FieldOpenApi
fn clone(&self) -> FieldOpenApi
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldOpenApi
impl Debug for FieldOpenApi
source§impl Default for FieldOpenApi
impl Default for FieldOpenApi
source§impl<'de> Deserialize<'de> for FieldOpenApi
impl<'de> Deserialize<'de> for FieldOpenApi
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Message for FieldOpenApi
impl Message for FieldOpenApi
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for FieldOpenApi
impl PartialEq for FieldOpenApi
source§impl Serialize for FieldOpenApi
impl Serialize for FieldOpenApi
impl StructuralPartialEq for FieldOpenApi
Auto Trait Implementations§
impl Freeze for FieldOpenApi
impl RefUnwindSafe for FieldOpenApi
impl Send for FieldOpenApi
impl Sync for FieldOpenApi
impl Unpin for FieldOpenApi
impl UnwindSafe for FieldOpenApi
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request