#[non_exhaustive]pub struct OpenApiAdapter { /* private fields */ }
Implementations§
Source§impl OpenApiAdapter
impl OpenApiAdapter
pub const SCHEMA_TEXT: &'static str = "schema {\r\n query: RootSchemaQuery\r\n}\r\ndirective @filter(\r\n \"\"\"\r\n Name of the filter operation to perform.\r\n \"\"\"\r\n op: String!\r\n \"\"\"\r\n List of string operands for the operator.\r\n \"\"\"\r\n value: [String!]\r\n) repeatable on FIELD | INLINE_FRAGMENT\r\ndirective @tag(\r\n \"\"\"\r\n Name to apply to the given property field.\r\n \"\"\"\r\n name: String\r\n) on FIELD\r\ndirective @output(\r\n \"\"\"\r\n What to designate the output field generated from this property field.\r\n \"\"\"\r\n name: String\r\n) on FIELD\r\ndirective @optional on FIELD\r\ndirective @recurse(\r\n \"\"\"\r\n Recurse up to this many times on this edge. A depth of 1 produces the current\r\n vertex and its immediate neighbors along the given edge.\r\n \"\"\"\r\n depth: Int!\r\n) on FIELD\r\ndirective @fold on FIELD\r\ndirective @transform(\r\n \"\"\"\r\n Name of the transformation operation to perform.\r\n \"\"\"\r\n op: String!\r\n) on FIELD\r\n\r\ntype RootSchemaQuery {\r\n \"\"\"\r\n OpenAPI doc info\r\n \"\"\"\r\n Info: Info!\r\n \r\n \"\"\"\r\n OpenAPI doc tags\r\n \"\"\"\r\n Tags: [Tag!]!\r\n\r\n \"\"\"\r\n OpenAPI doc paths\r\n \"\"\"\r\n Paths: [Path!]!\r\n\r\n \"\"\"\r\n OpenAPI doc path\r\n\r\n path: the path to the endpoint\r\n \"\"\"\r\n Path(path: String!): Path\r\n\r\n}\r\n\r\ntype Info {\r\n title: String!\r\n version: String!\r\n description: String\r\n}\r\n\r\ntype Tag {\r\n name: String!\r\n description: String\r\n}\r\n\r\ntype Path {\r\n path: String!\r\n get: Operation\r\n post: Operation\r\n put: Operation\r\n delete: Operation\r\n patch: Operation\r\n options: Operation\r\n operations: [Operation!]!\r\n}\r\n\r\ntype Operation {\r\n summary: String\r\n method: String!\r\n description: String\r\n tags: [String!]\r\n xAmazonApigatewayIntegration: AmazonApigatewayIntegration\r\n}\r\n\r\ntype AmazonApigatewayIntegration {\r\n type: String!\r\n httpMethod: String!\r\n uri: String!\r\n passthroughBehavior: String!\r\n timeoutInMillis: Int\r\n trigger: String!\r\n arn: String\r\n}\r\n"
Sourcepub fn new_with_files(files: Vec<PathBuf>) -> Result<Self, OpenAPIAdapterErrors>
pub fn new_with_files(files: Vec<PathBuf>) -> Result<Self, OpenAPIAdapterErrors>
New instance with selected files to used
pub fn new_with_path(path: PathBuf) -> Result<Self, OpenAPIAdapterErrors>
Trait Implementations§
Source§impl<'a> Adapter<'a> for OpenApiAdapter
impl<'a> Adapter<'a> for OpenApiAdapter
Source§fn resolve_starting_vertices(
&self,
edge_name: &Arc<str>,
parameters: &EdgeParameters,
_resolve_info: &ResolveInfo,
) -> VertexIterator<'a, Self::Vertex>
fn resolve_starting_vertices( &self, edge_name: &Arc<str>, parameters: &EdgeParameters, _resolve_info: &ResolveInfo, ) -> VertexIterator<'a, Self::Vertex>
Produce an iterator of vertices for the specified starting edge. Read more
Source§fn resolve_property<V: AsVertex<Self::Vertex> + 'a>(
&self,
contexts: ContextIterator<'a, V>,
type_name: &Arc<str>,
property_name: &Arc<str>,
resolve_info: &ResolveInfo,
) -> ContextOutcomeIterator<'a, V, FieldValue>
fn resolve_property<V: AsVertex<Self::Vertex> + 'a>( &self, contexts: ContextIterator<'a, V>, type_name: &Arc<str>, property_name: &Arc<str>, resolve_info: &ResolveInfo, ) -> ContextOutcomeIterator<'a, V, FieldValue>
Resolve a property required by the query that’s being evaluated. Read more
Source§fn resolve_neighbors<V: AsVertex<Self::Vertex> + 'a>(
&self,
contexts: ContextIterator<'a, V>,
type_name: &Arc<str>,
edge_name: &Arc<str>,
parameters: &EdgeParameters,
resolve_info: &ResolveEdgeInfo,
) -> ContextOutcomeIterator<'a, V, VertexIterator<'a, Self::Vertex>>
fn resolve_neighbors<V: AsVertex<Self::Vertex> + 'a>( &self, contexts: ContextIterator<'a, V>, type_name: &Arc<str>, edge_name: &Arc<str>, parameters: &EdgeParameters, resolve_info: &ResolveEdgeInfo, ) -> ContextOutcomeIterator<'a, V, VertexIterator<'a, Self::Vertex>>
Resolve the neighboring vertices across an edge. Read more
Source§fn resolve_coercion<V: AsVertex<Self::Vertex> + 'a>(
&self,
contexts: ContextIterator<'a, V>,
_type_name: &Arc<str>,
coerce_to_type: &Arc<str>,
_resolve_info: &ResolveInfo,
) -> ContextOutcomeIterator<'a, V, bool>
fn resolve_coercion<V: AsVertex<Self::Vertex> + 'a>( &self, contexts: ContextIterator<'a, V>, _type_name: &Arc<str>, coerce_to_type: &Arc<str>, _resolve_info: &ResolveInfo, ) -> ContextOutcomeIterator<'a, V, bool>
Attempt to coerce vertices to a subtype, as required by the query that’s being evaluated. Read more
Source§impl Debug for OpenApiAdapter
impl Debug for OpenApiAdapter
Source§impl Default for OpenApiAdapter
impl Default for OpenApiAdapter
Source§fn default() -> OpenApiAdapter
fn default() -> OpenApiAdapter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenApiAdapter
impl RefUnwindSafe for OpenApiAdapter
impl Send for OpenApiAdapter
impl Sync for OpenApiAdapter
impl Unpin for OpenApiAdapter
impl UnwindSafe for OpenApiAdapter
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more