vanestack_annotation 0.1.1+1 copy "vanestack_annotation: ^0.1.1+1" to clipboard
vanestack_annotation: ^0.1.1+1 copied to clipboard

Annotations and metadata types for the VaneStack Dart backend framework.

VaneStack Logo

vanestack_annotation

Annotations and metadata types for the VaneStack Dart backend framework.

Website · Documentation


This package provides the @Route annotation and HttpMethod enum used to define HTTP endpoints in VaneStack. It is a lightweight dependency with zero transitive dependencies.

Usage #

import 'package:vanestack_annotation/vanestack_annotation.dart';

@Route(path: '/v1/posts', method: HttpMethod.get)
FutureOr<List<Post>> listPosts(Request request) async {
  // ...
}

@Route(
  path: '/v1/posts/<postId>',
  method: HttpMethod.get,
  requireAuth: true,
)
FutureOr<Post> getPost(Request request, String postId) async {
  // ...
}

API #

@Route #

Parameter Type Default Description
path String required URL path, supports <param> syntax
method HttpMethod required HTTP method
requireAuth bool false Reject unauthenticated requests
requireSuperUserAuth bool false Require admin privileges
ignoreForClient bool false Exclude from generated client SDK

HttpMethod #

get, post, put, delete, patch, head, all

Package Description
vanestack Server framework
vanestack_generator Code generator that reads @Route annotations
vanestack_common Shared models and types
vanestack_client Generated HTTP client SDK
0
likes
150
points
83
downloads

Documentation

API reference

Publisher

verified publishervanestack.dev

Weekly Downloads

Annotations and metadata types for the VaneStack Dart backend framework.

Homepage
Repository (GitHub)
View/report issues

Topics

#server #backend #codegen

License

BSD-3-Clause (license)

More

Packages that depend on vanestack_annotation