Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d8502e7
feat(examples): add comprehensive feature examples
RAprogramm Jan 7, 2026
60024c9
fix(examples): add required dependencies and fix compilation
RAprogramm Jan 7, 2026
03bf860
#68 fix: hooks example - add utoipa dependency
RAprogramm Jan 7, 2026
e29f9d2
#69 fix: commands example - fix dependencies and struct naming
RAprogramm Jan 7, 2026
5b47b7e
feat: implement multi-entity transaction API (#70)
RAprogramm Jan 7, 2026
fed89ac
fix: remove unused import in soft-delete example (#71)
RAprogramm Jan 7, 2026
b6a509b
feat: implement stream_filtered for database streaming (#72)
RAprogramm Jan 7, 2026
e2197ec
fix: update events example for new event variants (#67)
RAprogramm Jan 7, 2026
1145533
fix: gate Future import behind postgres feature
RAprogramm Jan 7, 2026
8c8a262
style: reorder imports per rustfmt
RAprogramm Jan 7, 2026
c9cb773
Merge pull request #66 from RAprogramm/examples-refactor
RAprogramm Jan 7, 2026
5368bd1
#76 feat: add api attribute parsing for OpenAPI integration
RAprogramm Jan 7, 2026
53716ac
Merge pull request #84 from RAprogramm/76-api-attributes
RAprogramm Jan 7, 2026
718a200
#77 feat: add HTTP handler generation with OpenAPI documentation (#88)
RAprogramm Jan 7, 2026
5eda2c3
#78 feat: extract doc comments for OpenAPI descriptions
RAprogramm Jan 7, 2026
77035a5
#78 feat: extract doc comments for OpenAPI descriptions
RAprogramm Jan 7, 2026
0db154a
#79 feat: parse validation attributes for OpenAPI constraints
RAprogramm Jan 7, 2026
33501f3
Merge branch '79-validation-constraints' into 78-doc-comments
RAprogramm Jan 7, 2026
79caaaa
#80 feat: add example attribute parsing for OpenAPI schemas
RAprogramm Jan 7, 2026
b3e2ff0
#81 feat: add command-level security configuration
RAprogramm Jan 7, 2026
39cf5b7
#82 feat: add EntityError derive macro for OpenAPI error docs
RAprogramm Jan 7, 2026
bea4279
#83 feat: add API versioning and deprecation support
RAprogramm Jan 7, 2026
af7e7f3
fix: use non-PI float value in example test
RAprogramm Jan 7, 2026
4f56e4b
Merge branch '80-examples-support' into 81-security-config
RAprogramm Jan 7, 2026
51d16ef
Merge branch '81-security-config' into 82-error-docs
RAprogramm Jan 7, 2026
9c923e4
Merge branch '82-error-docs' into 83-api-versioning
RAprogramm Jan 7, 2026
3cee183
#67 feat(api): add OpenAPI info config and selective handlers (#94)
RAprogramm Jan 7, 2026
4d9c569
chore: bump versions and fix full-app example
RAprogramm Jan 7, 2026
1e81080
docs: update README with v0.4 features
RAprogramm Jan 7, 2026
6fe4abf
refactor: split large modules into smaller components
RAprogramm Jan 7, 2026
d441925
docs: add comprehensive module documentation
RAprogramm Jan 7, 2026
72f8b87
fmt
RAprogramm Jan 7, 2026
612059f
test: improve coverage to 94%
RAprogramm Jan 7, 2026
a24b357
test: increase coverage to 95%+ with comprehensive tests
RAprogramm Jan 7, 2026
4d4e6dc
test: add comprehensive tests for streams, field, and query modules
RAprogramm Jan 7, 2026
e248d5e
style: fix formatting
RAprogramm Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,33 @@ jobs:
automerge:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Check if Dependabot PR
id: check
run: |
if [ "${{ github.event.pull_request.user.login }}" = "dependabot[bot]" ]; then
echo "is_dependabot=true" >> $GITHUB_OUTPUT
else
echo "is_dependabot=false" >> $GITHUB_OUTPUT
echo "Not a Dependabot PR, skipping auto-merge"
fi

- name: Fetch Dependabot metadata
if: steps.check.outputs.is_dependabot == 'true'
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for minor/patch updates
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
if: steps.check.outputs.is_dependabot == 'true' && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Approve patch updates
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
if: steps.check.outputs.is_dependabot == 'true' && steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
Cargo.lock
examples/**/target/
20 changes: 16 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
[workspace]
resolver = "3"
members = ["crates/*"]
exclude = [
"examples/basic",
"examples/filtering",
"examples/relations",
"examples/events",
"examples/hooks",
"examples/commands",
"examples/transactions",
"examples/soft-delete",
"examples/streams",
"examples/full-app",
]

[workspace.package]
version = "0.3.0"
version = "0.4.0"
edition = "2024"
rust-version = "1.92"
authors = ["RAprogramm <andrey.rozanov.vl@gmail.com>"]
license = "MIT"
repository = "https://github.com/RAprogramm/entity-derive"

[workspace.dependencies]
entity-core = { path = "crates/entity-core", version = "0.1.2" }
entity-derive = { path = "crates/entity-derive", version = "0.3.2" }
entity-derive-impl = { path = "crates/entity-derive-impl", version = "0.1.2" }
entity-core = { path = "crates/entity-core", version = "0.2.0" }
entity-derive = { path = "crates/entity-derive", version = "0.4.0" }
entity-derive-impl = { path = "crates/entity-derive-impl", version = "0.2.0" }
syn = { version = "2", features = ["full", "extra-traits", "parsing"] }
quote = "1"
proc-macro2 = "1"
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<a href="https://api.reuse.software/info/github.com/RAprogramm/entity-derive">
<img src="https://img.shields.io/reuse/compliance/github.com%2FRAprogramm%2Fentity-derive?style=for-the-badge" alt="REUSE Compliant"/>
</a>
<a href="https://github.com/RAprogramm/entity-derive/wiki">
<img src="https://img.shields.io/badge/Wiki-Documentation-green?style=for-the-badge&logo=github" alt="Wiki"/>
</a>
</p>

---
Expand Down Expand Up @@ -74,7 +77,7 @@ pub struct User {

```toml
[dependencies]
entity-derive = { version = "0.3", features = ["postgres"] }
entity-derive = { version = "0.4", features = ["postgres", "api"] }
```

---
Expand All @@ -85,9 +88,11 @@ entity-derive = { version = "0.3", features = ["postgres"] }
|---------|-------------|
| **Zero Runtime Cost** | All code generation at compile time |
| **Type Safe** | Change a field once, everything updates |
| **Auto HTTP Handlers** | `api(handlers)` generates CRUD endpoints + router |
| **OpenAPI Docs** | Auto-generated Swagger/OpenAPI documentation |
| **Query Filtering** | Type-safe `#[filter]`, `#[filter(like)]`, `#[filter(range)]` |
| **Relations** | `#[belongs_to]` and `#[has_many]` |
| **Projections** | Partial views with optimized SELECT |
| **Transactions** | Multi-entity atomic operations |
| **Lifecycle Events** | `Created`, `Updated`, `Deleted` events |
| **Real-Time Streams** | Postgres LISTEN/NOTIFY integration |
| **Lifecycle Hooks** | `before_create`, `after_update`, etc. |
Expand Down Expand Up @@ -131,6 +136,14 @@ entity-derive = { version = "0.3", features = ["postgres"] }
streams, // Optional: real-time Postgres NOTIFY
hooks, // Optional: before/after lifecycle hooks
commands, // Optional: CQRS command pattern
transactions, // Optional: multi-entity transaction support
api( // Optional: generate HTTP handlers + OpenAPI
tag = "Users",
handlers, // All CRUD, or handlers(get, list, create)
security = "bearer", // cookie, bearer, api_key, or none
title = "My API",
api_version = "1.0.0",
),
)]
```

Expand Down
2 changes: 1 addition & 1 deletion crates/entity-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[package]
name = "entity-core"
version = "0.1.3"
version = "0.2.0"
edition = "2024"
rust-version = "1.92"
authors = ["RAprogramm <andrey.rozanov.vl@gmail.com>"]
Expand Down
7 changes: 3 additions & 4 deletions crates/entity-core/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@

#[cfg(feature = "streams")]
pub use crate::stream::StreamError;
#[cfg(feature = "postgres")]
pub use crate::transaction::TransactionContext;
pub use crate::{
CommandKind, EntityCommand, EntityEvent, EventKind, Pagination, Repository, SortDirection,
async_trait,
policy::{PolicyError, PolicyOperation},
transaction::{
Transaction, TransactionContext, TransactionError, TransactionOps, TransactionRunner,
Transactional
}
transaction::{Transaction, TransactionError}
};
Loading