Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1 #290

Merged
merged 43 commits into from
Aug 10, 2024
Merged

V1 #290

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
342cd5f
Define `Schema` as a newtype around `serde_json::Value` (#289)
GREsau May 12, 2024
3b3870c
Simplify `flatten`
GREsau May 13, 2024
b87b6eb
Remove usage of `is_some_and` (not supported in rustc 1.60)
GREsau May 13, 2024
efff7e2
Merge branch 'master' into v1
GREsau May 13, 2024
dec3c67
Remove test schemas for now-removed `RootSchema`
GREsau May 13, 2024
4dde683
Update OpenAPI 3.0 schema URI
GREsau May 13, 2024
f5d2142
Regenerate test schemas
GREsau May 13, 2024
8c2c32b
Regenerate example schemas
GREsau May 13, 2024
18300c6
Use `const` instead of single-valued `enum` (#291)
GREsau May 13, 2024
c4d42ec
Refactor `flatten` and move it to `_private`, remove `TempFixupForTes…
GREsau May 13, 2024
d3b6ff5
Re-add `preserve_order` feature, to preserve order of struct fields i…
GREsau May 18, 2024
22e89a5
Never add a field with the `default` attribute to a schema's `require…
GREsau May 18, 2024
95475ad
Use `$defs` instead of `definitions` in draft 2019-09
GREsau May 19, 2024
3aa0e7f
Support JSON Schema draft 2020-12 and use it by default (#294)
GREsau May 19, 2024
d32231c
Allow running visitors against pre-2020-12 schemas
GREsau May 20, 2024
1247b89
Revert to previous behaviour regarding visitors running on `$defs`/`d…
GREsau May 23, 2024
1819dce
Merge branch 'master' into v1
GREsau May 23, 2024
fe05631
impl JsonSchema for Schema
GREsau May 23, 2024
1aaa162
Make `schema_name()` return `Cow<'static, str>` instead of `String`
GREsau May 26, 2024
f8b56cb
Replace `is_referenceable()` with `always_inline_schema()`
GREsau May 26, 2024
fb6e1a5
Regenerate example schemas
GREsau May 26, 2024
760403e
Update doc comments and make `SchemaGenerator` available from crate root
GREsau May 27, 2024
3ee7c7f
v1.0.0-alpha.1
GREsau May 27, 2024
97b70aa
Update readme for v1
GREsau May 27, 2024
840315b
Add `#[schemars(extend("key" = value))]` attribute (#297)
GREsau Jun 5, 2024
3150f98
v1.0.0-alpha.2
GREsau Jun 5, 2024
d511d44
Add separate docs for v0.8/v1
GREsau Jun 9, 2024
6929583
Add `extend` attribute to docs
GREsau Jun 9, 2024
91ee3f9
Update docs for v1
GREsau Jun 9, 2024
ce15380
Do not collapse newlines in doc comments (#310)
GREsau Aug 4, 2024
ade95a5
Remove default implementation of `Visitor::visit_schema()`
GREsau Aug 4, 2024
ef9c8dc
Fix doctest
GREsau Aug 4, 2024
71b45a8
Remove irrelevant comments
GREsau Aug 4, 2024
324be32
Replace `visit::Visitor` with `transform::Transform`
GREsau Aug 7, 2024
a1c3bcd
Add `Send` requirement to `GenTransform`
GREsau Aug 8, 2024
29067a0
Add `GenTransform::as_any_mut` and add examples
GREsau Aug 9, 2024
14b06e7
Add `transform = ...` attribute (#312)
GREsau Aug 10, 2024
55b88b5
Add migration guide
GREsau Aug 10, 2024
56ebd54
Add v0/v1 note to readme
GREsau Aug 10, 2024
7bcd200
v1.0.0-alpha.3
GREsau Aug 10, 2024
c61b260
Update examples
GREsau Aug 10, 2024
4609590
Update changelog for 1.0.0 alpha versions
GREsau Aug 10, 2024
5054242
Merge branch 'master' into v1
GREsau Aug 10, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- nightly
include:
- rust: 1.60.0
test_features: "--features impl_json_schema"
test_features: ""
allow_failure: false
- rust: stable
test_features: "--all-features"
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## [1.0.0-alpha.3] - 2024-08-10

### Added

- `#[schemars(transform = some::transform)]` for applying arbitrary modifications to generated schemas. `some::transform` must be an expression of type `schemars::transform::Transform` - note that this can be a function with the signature `fn(&mut Schema) -> ()`.
- `SchemaSettings` and `SchemaGenerator` are both now `Send`

### Changed (_⚠️ breaking changes ⚠️_)

- `visit` module and `Visitor` trait have been replace with `transform` and `Transform` respectively. Accordingly, these items have been renamed:
- `SchemaSettings::visitors` -> `SchemaSettings::transforms`
- `SchemaSettings::with_visitor` -> `SchemaSettings::with_transform`
- `SchemaGenerator::visitors_mut` -> `SchemaGenerator::transforms_mut`
- `GenVisitor` -> `GenTransform`
- `Visitor::visit_schema` -> `Transform::transform`
- `visit::visit_schema` -> `transform::transform_subschemas`
- `GenTransform` must also impl `Send`, but no longer needs to impl `Debug`
- Doc comments no longer have newlines collapsed when generating the `description` property (https://github.com/GREsau/schemars/pull/310)

## [1.0.0-alpha.2] - 2024-06-05

### Added
Expand Down
105 changes: 38 additions & 67 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading