pub enum TemplateName {
Show 19 variants
Readme,
ApiOperation,
ModelInterface,
ModelTypeAlias,
ModelEnum,
Runtime,
ProjectIndex,
CommonFileHeader,
ApiConstructorBaseApi,
ApiMethodGet,
ApiMethodPostPutPatch,
ApiMethodDelete,
ApiMethodConvenience,
ApiBuildUrlPath,
ApiBuildQueryParams,
ApiBuildHeaders,
ApiBuildRequestBody,
ApiMakeRequest,
ModelInferenceHelpers,
}Expand description
Template name enum for type-safe template references All templates used in the TypeScript generator must be declared here Organized by FileCategory
Variants§
Readme
README documentation template
ApiOperation
Main API class template (generates complete API class files)
ModelInterface
Interface model template
ModelTypeAlias
Type alias model template
ModelEnum
Enum model template
Runtime
Runtime utilities template
ProjectIndex
Project index file template
CommonFileHeader
File header template (used across all file types, included by other templates)
ApiConstructorBaseApi
API method body: Constructor for base API class
ApiMethodGet
API method body: GET request handler
ApiMethodPostPutPatch
API method body: POST/PUT/PATCH request handler
ApiMethodDelete
API method body: DELETE request handler
ApiMethodConvenience
API method body: Convenience wrapper method
ApiBuildUrlPath
Partial: Build URL path snippet
ApiBuildQueryParams
Partial: Build query parameters snippet
ApiBuildHeaders
Partial: Build request headers snippet
ApiBuildRequestBody
Partial: Build request body snippet
ApiMakeRequest
Partial: Make HTTP request snippet
ModelInferenceHelpers
Model helper functions template (instanceOf/FromJSON/ToJSON/validation)
Implementations§
Source§impl TemplateName
impl TemplateName
Sourcepub fn file_path(&self) -> String
pub fn file_path(&self) -> String
Get the file path for this template (used for Minijinja template lookup)
Sourcepub fn resolve_path(&self, generator_name: &str) -> String
pub fn resolve_path(&self, generator_name: &str) -> String
Resolve the template path with generator prefix if needed All entry templates (those with a FileCategory) live in the generator-specific directory Snippets (FileCategory::None) remain at the root as they are included by entry templates
Sourcepub fn file_category(&self) -> FileCategory
pub fn file_category(&self) -> FileCategory
Get the file category for this template
Trait Implementations§
Source§impl Clone for TemplateName
impl Clone for TemplateName
Source§fn clone(&self) -> TemplateName
fn clone(&self) -> TemplateName
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TemplateName
impl Debug for TemplateName
Source§impl<'de> Deserialize<'de> for TemplateName
impl<'de> Deserialize<'de> for TemplateName
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 Hash for TemplateName
impl Hash for TemplateName
Source§impl PartialEq for TemplateName
impl PartialEq for TemplateName
Source§impl Serialize for TemplateName
impl Serialize for TemplateName
impl Copy for TemplateName
impl Eq for TemplateName
impl StructuralPartialEq for TemplateName
Auto Trait Implementations§
impl Freeze for TemplateName
impl RefUnwindSafe for TemplateName
impl Send for TemplateName
impl Sync for TemplateName
impl Unpin for TemplateName
impl UnsafeUnpin for TemplateName
impl UnwindSafe for TemplateName
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.