From 0130e5e964ce9d5fafd5866b081d1be043005dfa Mon Sep 17 00:00:00 2001 From: devolutionsbot <31221910+devolutionsbot@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:19:52 -0400 Subject: [PATCH 1/2] chore(release): prepare for publishing --- Cargo.lock | 105 +++++++++--------- policies/rust/now-policy-api/CHANGELOG.md | 63 +++++++++++ policies/rust/now-policy-api/Cargo.toml | 2 +- .../now-policy-server-template/CHANGELOG.md | 63 +++++++++++ .../now-policy-server-template/Cargo.toml | 4 +- 5 files changed, 182 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7177c60..1205fc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,7 +55,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -129,9 +129,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cc" -version = "1.4.2" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e" +checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273" dependencies = [ "find-msvc-tools", "shlex", @@ -203,7 +203,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -236,9 +236,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" +checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" [[package]] name = "form_urlencoded" @@ -305,7 +305,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -420,9 +420,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" dependencies = [ "displaydoc", "potential_utf", @@ -434,9 +434,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" dependencies = [ "displaydoc", "litemap", @@ -447,9 +447,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -461,16 +461,17 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" [[package]] name = "icu_properties" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" dependencies = [ + "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", @@ -481,15 +482,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" [[package]] name = "icu_provider" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" dependencies = [ "displaydoc", "icu_locale_core", @@ -573,15 +574,15 @@ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "litemap" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" [[package]] name = "log" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" [[package]] name = "matchit" @@ -626,7 +627,7 @@ dependencies = [ [[package]] name = "now-policy-api" -version = "0.3.1" +version = "0.4.0" dependencies = [ "chrono", "derive_more", @@ -641,7 +642,7 @@ dependencies = [ [[package]] name = "now-policy-server-template" -version = "0.3.0" +version = "0.4.0" dependencies = [ "aide", "async-trait", @@ -714,9 +715,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "potential_utf" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [ "zerovec", ] @@ -750,22 +751,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -913,7 +914,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -1035,9 +1036,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f" dependencies = [ "proc-macro2", "quote", @@ -1078,14 +1079,14 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] name = "tinystr" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" dependencies = [ "displaydoc", "zerovec", @@ -1110,7 +1111,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -1244,9 +1245,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.24.1" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cefc03fd367c0c6d4305de1b312cf00248c4114f4a0418ce6a6af769e3b0bd9" +checksum = "b5772d71c9be8a8a6ac2117d949c5b224c1b72241bb611d9a3012edcf8af7812" [[package]] name = "wasm-bindgen" @@ -1363,9 +1364,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "xshell" @@ -1437,9 +1438,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" dependencies = [ "displaydoc", "yoke", @@ -1448,9 +1449,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" dependencies = [ "yoke", "zerofrom", @@ -1459,13 +1460,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.3" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.4", ] [[package]] diff --git a/policies/rust/now-policy-api/CHANGELOG.md b/policies/rust/now-policy-api/CHANGELOG.md index 95ddc3a..ba66eaf 100644 --- a/policies/rust/now-policy-api/CHANGELOG.md +++ b/policies/rust/now-policy-api/CHANGELOG.md @@ -6,6 +6,69 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[0.4.0](https://github.com/Devolutions/now-libraries/compare/now-policy-api-v0.3.1...now-policy-api-v0.4.0)] - 2026-08-28 + +### Features + +- Add active package policy inspection contract ([#93](https://github.com/Devolutions/now-libraries/issues/93)) ([cd5a6e9f8e](https://github.com/Devolutions/now-libraries/commit/cd5a6e9f8eeb3c70cc9ef9003ffeb46716ceced6)) + + - add canonical `GET /v1/policy` support across the Rust server + contract, generated OpenAPI, C# DTOs, and + `BrokerClient.GetPolicy(CancellationToken)` + - return the existing canonical `PolicyDocument` inside a versioned + `PolicyResponse`, with structured `404 NotFound` behavior when no active + policy is configured + - make policy inspection unconditional: remove `policy-compat` and its + cross-model conversion impls, and keep runtime mapping ownership in + broker implementations + - name the required Rust server accessor `active_policy`, leaving clear + room for a future explicit `replace_policy` operation backed by a + separate policy-store abstraction + - harden C# successful-response validation for required/null fields, + collection elements, unknown members, and canonical enum casing + - preserve existing OpenAPI component names by namespacing colliding + embedded policy components as `PolicyModel…` + - run workspace Rust tests and Clippy with all features through the + standard xtask commands + + ## API changes + + ### Rust + + - `now-policy-api` adds public `PolicyResponse` and + `PolicyResponseKind`; `now-policy` is now a normal dependency because + `PolicyDocument` is part of the permanent wire contract + - `PackageBrokerServer` adds the required method: + + ```rust + async fn active_policy(&self) -> Result; + ``` + + - `now-policy-server-template` registers the route unconditionally and + extends its mock with policy response/error builders + - `policy-compat` and its `From`/`TryFrom` conversions are removed + + ### C# + + - `Devolutions.Now.Policy.Api` adds `PolicyResponse`, embedding + `Devolutions.Now.Policy.Model.PolicyDocument` + - `Devolutions.Now.Policy.Client` adds `GetPolicy(CancellationToken)` + with strict validation of successful response bodies + - policy-model deserialization now enforces required members, non-null + collection elements, and canonical enum casing + + ### HTTP + + - adds read-only `GET /v1/policy` + - `200`: `PolicyResponse` + - `404`: structured `ErrorResponse` when no active policy is configured + - other failures use the existing `ErrorResponse` contract + - no policy mutation endpoint is introduced + + --------- + + + ## [[0.3.1](https://github.com/Devolutions/now-libraries/compare/now-policy-api-v0.3.0...now-policy-api-v0.3.1)] - 2026-08-13 ### Bug Fixes diff --git a/policies/rust/now-policy-api/Cargo.toml b/policies/rust/now-policy-api/Cargo.toml index b01c9ff..b9a1409 100644 --- a/policies/rust/now-policy-api/Cargo.toml +++ b/policies/rust/now-policy-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "now-policy-api" -version = "0.3.1" +version = "0.4.0" edition = "2024" license.workspace = true homepage.workspace = true diff --git a/policies/rust/now-policy-server-template/CHANGELOG.md b/policies/rust/now-policy-server-template/CHANGELOG.md index 1726eb2..9278794 100644 --- a/policies/rust/now-policy-server-template/CHANGELOG.md +++ b/policies/rust/now-policy-server-template/CHANGELOG.md @@ -6,6 +6,69 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[0.4.0](https://github.com/Devolutions/now-libraries/compare/now-policy-server-template-v0.3.0...now-policy-server-template-v0.4.0)] - 2026-08-28 + +### Features + +- Add active package policy inspection contract ([#93](https://github.com/Devolutions/now-libraries/issues/93)) ([cd5a6e9f8e](https://github.com/Devolutions/now-libraries/commit/cd5a6e9f8eeb3c70cc9ef9003ffeb46716ceced6)) + + - add canonical `GET /v1/policy` support across the Rust server + contract, generated OpenAPI, C# DTOs, and + `BrokerClient.GetPolicy(CancellationToken)` + - return the existing canonical `PolicyDocument` inside a versioned + `PolicyResponse`, with structured `404 NotFound` behavior when no active + policy is configured + - make policy inspection unconditional: remove `policy-compat` and its + cross-model conversion impls, and keep runtime mapping ownership in + broker implementations + - name the required Rust server accessor `active_policy`, leaving clear + room for a future explicit `replace_policy` operation backed by a + separate policy-store abstraction + - harden C# successful-response validation for required/null fields, + collection elements, unknown members, and canonical enum casing + - preserve existing OpenAPI component names by namespacing colliding + embedded policy components as `PolicyModel…` + - run workspace Rust tests and Clippy with all features through the + standard xtask commands + + ## API changes + + ### Rust + + - `now-policy-api` adds public `PolicyResponse` and + `PolicyResponseKind`; `now-policy` is now a normal dependency because + `PolicyDocument` is part of the permanent wire contract + - `PackageBrokerServer` adds the required method: + + ```rust + async fn active_policy(&self) -> Result; + ``` + + - `now-policy-server-template` registers the route unconditionally and + extends its mock with policy response/error builders + - `policy-compat` and its `From`/`TryFrom` conversions are removed + + ### C# + + - `Devolutions.Now.Policy.Api` adds `PolicyResponse`, embedding + `Devolutions.Now.Policy.Model.PolicyDocument` + - `Devolutions.Now.Policy.Client` adds `GetPolicy(CancellationToken)` + with strict validation of successful response bodies + - policy-model deserialization now enforces required members, non-null + collection elements, and canonical enum casing + + ### HTTP + + - adds read-only `GET /v1/policy` + - `200`: `PolicyResponse` + - `404`: structured `ErrorResponse` when no active policy is configured + - other failures use the existing `ErrorResponse` contract + - no policy mutation endpoint is introduced + + --------- + + + ## [[0.3.0](https://github.com/Devolutions/now-libraries/compare/now-policy-server-template-v0.2.0...now-policy-server-template-v0.3.0)] - 2026-08-05 ### Features diff --git a/policies/rust/now-policy-server-template/Cargo.toml b/policies/rust/now-policy-server-template/Cargo.toml index ed6ead8..c07ba4c 100644 --- a/policies/rust/now-policy-server-template/Cargo.toml +++ b/policies/rust/now-policy-server-template/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "now-policy-server-template" -version = "0.3.0" +version = "0.4.0" edition = "2024" license.workspace = true homepage.workspace = true @@ -17,7 +17,7 @@ workspace = true aide = { version = "0.15", features = ["axum", "axum-json"] } async-trait = "0.1" axum = { version = "0.8", default-features = false, features = ["json"] } -now-policy-api = { version = "0.3", path = "../now-policy-api" } +now-policy-api = { version = "0.4", path = "../now-policy-api" } now-policy = { version = "0.2", path = "../now-policy" } schemars = "0.9" serde = { version = "1", features = ["derive"] } From 9ba08219756a6bb8bf4c6ab33e5d04e39bbc3bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20CORTIER?= Date: Fri, 28 Aug 2026 22:52:57 +0900 Subject: [PATCH 2/2] docs: clean up release changelogs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- policies/rust/now-policy-api/CHANGELOG.md | 59 +------------------ .../now-policy-server-template/CHANGELOG.md | 59 +------------------ 2 files changed, 2 insertions(+), 116 deletions(-) diff --git a/policies/rust/now-policy-api/CHANGELOG.md b/policies/rust/now-policy-api/CHANGELOG.md index ba66eaf..b701def 100644 --- a/policies/rust/now-policy-api/CHANGELOG.md +++ b/policies/rust/now-policy-api/CHANGELOG.md @@ -10,64 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features -- Add active package policy inspection contract ([#93](https://github.com/Devolutions/now-libraries/issues/93)) ([cd5a6e9f8e](https://github.com/Devolutions/now-libraries/commit/cd5a6e9f8eeb3c70cc9ef9003ffeb46716ceced6)) - - - add canonical `GET /v1/policy` support across the Rust server - contract, generated OpenAPI, C# DTOs, and - `BrokerClient.GetPolicy(CancellationToken)` - - return the existing canonical `PolicyDocument` inside a versioned - `PolicyResponse`, with structured `404 NotFound` behavior when no active - policy is configured - - make policy inspection unconditional: remove `policy-compat` and its - cross-model conversion impls, and keep runtime mapping ownership in - broker implementations - - name the required Rust server accessor `active_policy`, leaving clear - room for a future explicit `replace_policy` operation backed by a - separate policy-store abstraction - - harden C# successful-response validation for required/null fields, - collection elements, unknown members, and canonical enum casing - - preserve existing OpenAPI component names by namespacing colliding - embedded policy components as `PolicyModel…` - - run workspace Rust tests and Clippy with all features through the - standard xtask commands - - ## API changes - - ### Rust - - - `now-policy-api` adds public `PolicyResponse` and - `PolicyResponseKind`; `now-policy` is now a normal dependency because - `PolicyDocument` is part of the permanent wire contract - - `PackageBrokerServer` adds the required method: - - ```rust - async fn active_policy(&self) -> Result; - ``` - - - `now-policy-server-template` registers the route unconditionally and - extends its mock with policy response/error builders - - `policy-compat` and its `From`/`TryFrom` conversions are removed - - ### C# - - - `Devolutions.Now.Policy.Api` adds `PolicyResponse`, embedding - `Devolutions.Now.Policy.Model.PolicyDocument` - - `Devolutions.Now.Policy.Client` adds `GetPolicy(CancellationToken)` - with strict validation of successful response bodies - - policy-model deserialization now enforces required members, non-null - collection elements, and canonical enum casing - - ### HTTP - - - adds read-only `GET /v1/policy` - - `200`: `PolicyResponse` - - `404`: structured `ErrorResponse` when no active policy is configured - - other failures use the existing `ErrorResponse` contract - - no policy mutation endpoint is introduced - - --------- - - +- [**breaking**] Add `PolicyResponse` and `PolicyResponseKind` for active policy inspection, embedding `now_policy::PolicyDocument`; make `now-policy` a required dependency and remove the `policy-compat` feature and conversions ([#93](https://github.com/Devolutions/now-libraries/issues/93)) ([cd5a6e9f8e](https://github.com/Devolutions/now-libraries/commit/cd5a6e9f8eeb3c70cc9ef9003ffeb46716ceced6)) ## [[0.3.1](https://github.com/Devolutions/now-libraries/compare/now-policy-api-v0.3.0...now-policy-api-v0.3.1)] - 2026-08-13 diff --git a/policies/rust/now-policy-server-template/CHANGELOG.md b/policies/rust/now-policy-server-template/CHANGELOG.md index 9278794..08b5dca 100644 --- a/policies/rust/now-policy-server-template/CHANGELOG.md +++ b/policies/rust/now-policy-server-template/CHANGELOG.md @@ -10,64 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features -- Add active package policy inspection contract ([#93](https://github.com/Devolutions/now-libraries/issues/93)) ([cd5a6e9f8e](https://github.com/Devolutions/now-libraries/commit/cd5a6e9f8eeb3c70cc9ef9003ffeb46716ceced6)) - - - add canonical `GET /v1/policy` support across the Rust server - contract, generated OpenAPI, C# DTOs, and - `BrokerClient.GetPolicy(CancellationToken)` - - return the existing canonical `PolicyDocument` inside a versioned - `PolicyResponse`, with structured `404 NotFound` behavior when no active - policy is configured - - make policy inspection unconditional: remove `policy-compat` and its - cross-model conversion impls, and keep runtime mapping ownership in - broker implementations - - name the required Rust server accessor `active_policy`, leaving clear - room for a future explicit `replace_policy` operation backed by a - separate policy-store abstraction - - harden C# successful-response validation for required/null fields, - collection elements, unknown members, and canonical enum casing - - preserve existing OpenAPI component names by namespacing colliding - embedded policy components as `PolicyModel…` - - run workspace Rust tests and Clippy with all features through the - standard xtask commands - - ## API changes - - ### Rust - - - `now-policy-api` adds public `PolicyResponse` and - `PolicyResponseKind`; `now-policy` is now a normal dependency because - `PolicyDocument` is part of the permanent wire contract - - `PackageBrokerServer` adds the required method: - - ```rust - async fn active_policy(&self) -> Result; - ``` - - - `now-policy-server-template` registers the route unconditionally and - extends its mock with policy response/error builders - - `policy-compat` and its `From`/`TryFrom` conversions are removed - - ### C# - - - `Devolutions.Now.Policy.Api` adds `PolicyResponse`, embedding - `Devolutions.Now.Policy.Model.PolicyDocument` - - `Devolutions.Now.Policy.Client` adds `GetPolicy(CancellationToken)` - with strict validation of successful response bodies - - policy-model deserialization now enforces required members, non-null - collection elements, and canonical enum casing - - ### HTTP - - - adds read-only `GET /v1/policy` - - `200`: `PolicyResponse` - - `404`: structured `ErrorResponse` when no active policy is configured - - other failures use the existing `ErrorResponse` contract - - no policy mutation endpoint is introduced - - --------- - - +- [**breaking**] Add the required `PackageBrokerServer::active_policy` method and expose it through `GET /v1/policy`; the mock server can configure policy responses or errors and defaults to `404 Not Found` when no active policy is set ([#93](https://github.com/Devolutions/now-libraries/issues/93)) ([cd5a6e9f8e](https://github.com/Devolutions/now-libraries/commit/cd5a6e9f8eeb3c70cc9ef9003ffeb46716ceced6)) ## [[0.3.0](https://github.com/Devolutions/now-libraries/compare/now-policy-server-template-v0.2.0...now-policy-server-template-v0.3.0)] - 2026-08-05