Attribute Reference

Alphabetical index of every Spiderly attribute, with a one-line purpose and a link to the topic page where it is documented in context.

How to Use This Page

This page is a flat A–Z index — useful when you know the attribute name and want to jump straight to its full documentation. For tutorials and worked examples, follow the Documented in link to the relevant topic page.

Every attribute on this list lives in the Spiderly.Shared package. Standard .NET data annotations ([Required], [StringLength], [Range], [Precision]) that Spiderly also reacts to are documented in Validation.

Reference

AttributeTargetDescription
[AcceptedFileTypes]PropertySpecifies the accepted file types for a blob property. When not applied, the file upload defaults to accepting images only (image/*). Use this attribute alongside any StorageAttribute subclass (e.g. [S3PublicStorage]) for non-image uploads (PDFs, Excel files, etc.).
[AuthGuard]Class, MethodProvides authentication protection for API endpoints by validating JWT tokens in the request.
[CascadeDelete]PropertyImplements cascade delete behavior in many-to-one relationships. When the referenced entity is deleted, all entities that reference it will automatically be deleted as well. This attribute is useful when: - Child entities should not exist without their parent
[ComplexManyToManyList]PropertyGenerates an editable list UI for complex many-to-many relationships (junction tables with additional fields). Shows ALL entities from the "other side" with editable junction fields. No add/remove/reorder controls. Warning: This loads all "other side" entities into the form. Suitable for small sets (e.g., 3 warehouses), not for large sets (e.g., thousands of entities).
[ComplexManyToManyReadonlyTable]PropertyJust showing the complex (with additional fields) M2M relationship in a table form
[Controller]ClassSpecifies a custom controller name for an entity, overriding the default naming convention. This attribute allows grouping multiple related entities under a single controller. Default behavior without 'Controller' attribute: Controllers are named as '{EntityName}Controller'
[DiskStorage]PropertyRoutes upload/delete operations for the decorated string property through DiskStorageService, storing files under the local filesystem. Intended for local development; not recommended for production deployments where the host filesystem is ephemeral or shared across replicas.
[DisplayName]Class, PropertySpecifies which property should be used as the display name for an entity in UI elements: - When applied to a property: The property's value will be used to represent the entity - When applied to a class: The specified property's value will be used to represent the entity - If no property or class is marked with this attribute: The entity's 'Id' will be used
[DoNotAuthorize]ClassDisables authorization checks for CRUD operations on the decorated entity. By default, all entities require authorization for CRUD operations. Warning: This attribute bypasses security checks and should be used with extreme caution. It is primarily intended for testing purposes and should generally be avoided in production environments.
[Email]PropertyValidates that a string property value is a valid email address. This attribute provides both server-side and client-side validation.
[ExcludeFromDTO]PropertySpecifies that a property should be excluded from the generated DTO.
[ExcludeFromExcelExport]PropertySpecifies that a property should be excluded from the generated Excel export (the Export{Entity}ListToExcel column set), while remaining present in the DTO and the rest of the API/UI. Use it for internal/technical columns that are noise in a human-readable sheet (raw foreign-key ids, gateway correlation data, sync plumbing, etc.). Place it on the property that produces the column: a scalar property excludes the matching DTO column; a many-to-one navigation property excludes the generated {Nav}DisplayName (and the synthesized {Nav}Id when there is no explicit foreign-key scalar). Differs from ExcludeFromDTOAttribute, which removes the property from the DTO entirely (no API exposure at all). This one only hides the column from the Excel export. Placement controls which column disappears, so for a many-to-one you can drop just the raw id while keeping the human-readable name (or vice-versa): Putting it on the navigation property instead (OrderStatus) hides OrderStatusDisplayName, and also OrderStatusId only when no explicit foreign-key scalar like the one above is declared.
[ExcludeServiceMethodsFromGeneration]PropertyPrevents the generation of standard service methods for the decorated property in the {Entity}ServiceGenerated class. Use this attribute when you want to: - Implement custom business logic instead of using generated methods - Override the default generated behavior with your own implementation - Exclude specific properties from the standard service method generation Note: The property will still be part of the entity, but no service methods will be generated for it in the {Entity}ServiceGenerated class.
[GenerateCommaSeparatedDisplayName]PropertyGenerates a string property in the DTO containing comma-separated display names for a collection property in the entity.
[GreaterThanOrEqualTo]PropertyValidates that a numeric property value is greater than or equal to a specified number. This attribute provides both server-side and client-side validation.
[ImageHeight]PropertyValidates exact image height for a blob property. This attribute provides both server-side and client-side validation. Use this attribute alongside any StorageAttribute subclass for image uploads.
[ImageWidth]PropertyValidates exact image width for a blob property. This attribute provides both server-side and client-side validation. Use this attribute alongside any StorageAttribute subclass for image uploads.
[IncludeInDTO]PropertySpecifies that a property should be included in the generated DTO. This attribute is particularly useful for enumerable properties, which are not included in DTOs by default. Note: This attribute only affects DTO generation and does not influence the mapping behavior (Entity to DTO and vice versa).
[M2M]ClassIndicates that the entity represents a helper table for a many-to-many (M2M) relationship.
[M2MWithMany]PropertyMarks a property in a many-to-many (M2M) relationship.
[MaxFileSize]PropertySpecifies the maximum allowed file size (in bytes) for a blob property. When not applied, the file upload defaults to 20 MB (20,000,000 bytes). Use this attribute alongside any StorageAttribute subclass for file uploads.
[Output]AllSpecifies the output configuration for the Source Generator. Note: This is a temporary solution and may be replaced in future versions.
[ProjectToDTO]ClassSpecifies custom mapping configuration when projecting an entity to its DTO.
[S3PrivateStorage]PropertyRoutes upload/delete operations for the decorated string property through S3PrivateStorageService. The column stores an opaque S3 key; access is expected to be mediated via signed URLs or a backend proxy rather than direct CDN retrieval. Intended for files that contain personal or compliance-sensitive data (warranty receipts, ID documents, customer-uploaded invoices).
[S3PublicStorage]PropertyRoutes upload/delete operations for the decorated string property through S3PublicStorageService. The bucket is configured for public access and the column stores a fully-qualified CDN URL; objects are uploaded with Cache-Control: public, max-age=31536000, immutable.
[SetNull]PropertySpecifies that the property should be set to null when the parent entity is deleted. Apply this attribute to a many-to-one relationship property.
[ShowSpinner]AllForces the global full-screen loading spinner ON for the decorated controller method, overriding the generator's auto-skip inference. The explicit attribute always wins over inference. You rarely need this. The spinner is shown by default; you only reach for this attribute to re-enable it on a call the generator would otherwise auto-skip — namely a deliberately slow HttpGet that returns a bare scalar (which is auto-skipped because such reads are normally instant). If your endpoint does real work, it is usually a POST — and POSTs keep the spinner without any attribute, so prefer the correct verb over this. Do not put this on the read-shaped responses (NamebookDTO, CodebookDTO, PaginatedResultDTO, LazyLoadSelectedIdsResultDTO): those power autocomplete, dropdowns and table pagination, where a full-screen blackout on every keystroke / page change is a regression. (The attribute still wins there if you insist — it just shouldn't be used that way.) Example (a slow scalar read where the blocking overlay is wanted):
[SimpleManyToManyTableLazyLoad]PropertySpecifies that a table items for the many-to-many relationship administration should be loaded lazily (on-demand) rather than eagerly.
[SkipSpinner]AllIndicates that the global full-screen loading spinner should be skipped for the decorated controller method. You usually don't need this. The generator already skips the spinner automatically for read-shaped responses (NamebookDTO, CodebookDTO, PaginatedResultDTO, LazyLoadSelectedIdsResultDTO) and for any HttpGet that returns a bare scalar (int, long, bool, decimal, DateTime, …). Reach for this attribute only when the inference can't see your intent. For the inverse — forcing the spinner back ON for a call the inference auto-skips — use ShowSpinnerAttribute. Use when: - A GET returns a full DTO but is polled / refreshed on a timer (e.g. a dashboard fetched every minute) - You want to implement custom loading behavior - The operation runs in the background Example (a polled DTO — a bare-scalar count GET like GetUnreadNotificationsCountForCurrentUser would be auto-skipped without this):
[SpiderlyController]ClassMarks a class as a Spiderly custom controller. Source generators only enroll classes carrying this attribute.
[SpiderlyDTO]ClassMarks a hand-written DTO class for inclusion in the Spiderly pipeline. Generated DTOs ({Entity}DTO, {Entity}SaveBodyDTO, {Entity}MainUIFormDTO) do not need this attribute.
[SpiderlyDataMapper]ClassMarks a class as a hand-written Spiderly data mapper. Source generators enroll classes carrying this attribute when composing Mapster configuration with user-provided overrides.
[SpiderlyEntity]ClassMarks a class as a Spiderly entity. Source generators only enroll classes carrying this attribute.
[SpiderlyEnum]Class, EnumMarks a C# enum or a class-based enum (static class of string constants) as a Spiderly enum. Source generators enroll enums carrying this attribute when emitting Angular enum definitions.
[SpiderlyService]ClassMarks a hand-written entity service as a Spiderly service. Source generators enroll classes carrying this attribute when composing DI registration and dependency lookups. The class is still expected to extend the generated {Entity}ServiceGenerated base.
[UIAdditionalPermissionCodeForInsert]ClassSpecifies additional permission requirements for inserting entities in the UI. The user must have ONE of the specified permissions to perform the insert operation. Multiple instances of this attribute can be applied to a single entity.
[UIAdditionalPermissionCodeForUpdate]ClassSpecifies additional permission requirements for updating entities in the UI. The user must have ONE of the specified permissions to perform the update operation. Multiple instances of this attribute can be applied to a single entity.
[UIControlType]PropertySpecifies the UI control type for a property. If not specified, the control type is automatically determined based on the property type: - string: TextBox (or TextArea if [StringLength] value is large) - int/long: Number - decimal: Decimal - bool: CheckBox - DateTime: Calendar - many-to-one: Autocomplete
[UIControlWidth]PropertySpecifies the width of a UI field using Spiderly column classes (from spiderly-grid). Default values: - "col-8" for TextArea and Editor controls - "col-8 md:col-4" for all other controls
[UIDoNotGenerate]Class, Method, PropertyApply to a property to exclude it from the UI form. Apply to an entity to exclude the entire UI form generation. Apply to a controller method to exclude the UI controller method generation.
[UIOrderedOneToMany]PropertyEnables management of child entities through an ordered list in the parent entity's main UI form component.
[UIPropertyBlockOrder]PropertySpecifies the display order of UI controls. Controls are displayed in the order of property declaration, except for: 'file', 'text-area', 'editor', and 'table' controls, which are always displayed last in their declaration order.
[UISection]PropertyGroups the property into a named section (card) on the generated details page. All properties sharing the same section name render together inside one panel, in the order the properties are declared; sections themselves are ordered by first appearance (the position of the first property that declares the section). Properties without this attribute collapse into a single implicit, headerless section positioned by the same first-appearance rule — so a newly added property always shows up automatically, either in its declared section or the implicit one. The argument is a Transloco translation key used as the section header (e.g. "Security" resolves through t('Security')), matching how other generated panel titles are translated. Backward compatibility: if no property on the entity declares this attribute, the details page renders as before (a single panel with one grid). Sectioning activates only when at least one property is annotated.
[UITableColumn]PropertySpecifies which columns should be displayed in a table view for a many-to-many relationship. Must be used in combination with [SimpleManyToManyTableLazyLoad] attribute.
[WithMany]PropertySpecifies the collection navigation property name in a related entity for establishing a bidirectional relationship in Entity Framework. Purpose: This attribute is used to define the inverse navigation property in a relationship, enabling proper relationship configuration and navigation in both directions.
[WithOne]PropertyDeclares a one-to-one relationship. Place on the dependent (foreign-key-holding) side's single-valued reference navigation. Its presence designates this side as the dependent; the other side is the principal. Required vs optional: add [Required] to make the dependent's FK non-nullable ("dependent must have a principal"). Omit it for an optional 1-1 (nullable FK, many NULLs allowed). The schema cannot enforce "principal must have a dependent" — that direction is always 0..1. Unidirectional: use the parameterless constructor when the principal has no back-navigation.

Standard .NET Attributes

Spiderly also reacts to the standard System.ComponentModel.DataAnnotations attributes:

AttributeGenerates
[Required]Server + client NotEmpty validation, non-nullable column
[StringLength(max)] / [StringLength(max, MinimumLength = min)]Server + client length validation, EF column length
[Range(min, max)]Server + client range validation
[Precision(p, s)]Server + client decimal validation, EF column precision

See Validation for usage examples.