Skip to content

Conversation

@bart-degreed
Copy link
Contributor

@bart-degreed bart-degreed commented May 5, 2021

The limitation that custom routes must end in the public resource name no longer applies.

  • Fixed: Resource-level Self links in atomic:operations responses are now hidden when no controller exists for the resource type.
  • Fixed: For determining which links to render, settings from primary resource were used on secondary endpoints. For example, if you configure Customer to show all links, but Orders no show none, then /customer/1/orders would show all links.
  • Optimization: Compound page[size] parameter value (example: 10,articles:5) is calculated once, instead of again for each pagination link.
  • Deprecated: IJsonApiRequest.BasePath. This information is no longer needed, but we still set it for back-compat.
  • Added support for non-standard route parameters in links, for example: [DisableRoutingConvention, Route("{shopName}/products")]

Fixes #956.

QUALITY CHECKLIST

  • Changes implemented in code
  • Complies with our contributing guidelines
  • Adapted tests
  • Documentation updated
  • N/A: Created issue to update Templates: {ISSUE_NUMBER}

@bart-degreed bart-degreed force-pushed the routing-links branch 3 times, most recently from 44f3461 to 830ba5d Compare May 6, 2021 00:19
@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #987 (4afa439) into master (1157dde) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #987   +/-   ##
=======================================
  Coverage   92.00%   92.01%           
=======================================
  Files         283      283           
  Lines        7658     7661    +3     
=======================================
+ Hits         7046     7049    +3     
  Misses        612      612           
Impacted Files Coverage Δ
src/JsonApiDotNetCore/Middleware/JsonApiRequest.cs 100.00% <ø> (ø)
...iDotNetCore/Middleware/JsonApiRoutingConvention.cs 90.32% <100.00%> (+0.84%) ⬆️
...piDotNetCore/Serialization/Building/LinkBuilder.cs 99.20% <100.00%> (-0.09%) ⬇️
...NetCore/Serialization/Objects/RelationshipLinks.cs 100.00% <100.00%> (ø)
...iDotNetCore/Serialization/Objects/ResourceLinks.cs 100.00% <100.00%> (ø)
...iDotNetCore/Serialization/Objects/TopLevelLinks.cs 100.00% <100.00%> (ø)
...ApiDotNetCore/Serialization/RequestDeserializer.cs 99.58% <100.00%> (+0.01%) ⬆️
.../Internal/QueryableBuilding/SelectClauseBuilder.cs 94.28% <0.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1157dde...4afa439. Read the comment docs.

@bart-degreed bart-degreed force-pushed the routing-links branch 4 times, most recently from 49f25fb to a85606f Compare May 19, 2021 15:41
…he limitation that custom routes must end in the public resource name no longer applies.

- Fixed: Resource-level Self links in atomic:operations responses are now hidden when no controller exists for the resource type.
- Fixed: For determining which links to render, settings from primary resource were used on secondary endpoints. For example, if you configure Customer to show all links, but Orders no show none, then /customer/1/orders would show all links.
- Optimization: Compound `page[size]` parameter value (example: `10,articles:5`) is calculated once, instead of again for each pagination link.
- Deprecated: `IJsonApiRequest.BasePath`. This information is no longer needed, but we still set it for back-compat.
- Added support for non-standard route parameters in links, for example: `[DisableRoutingConvention, Route("{shopName}/products")]`
@bart-degreed bart-degreed marked this pull request as ready for review May 19, 2021 15:53
@bart-degreed
Copy link
Contributor Author

@alastairtree can you give this a try?

@bart-degreed bart-degreed requested a review from maurei May 19, 2021 15:53
@bart-degreed bart-degreed merged commit 9380b76 into master May 28, 2021
@bart-degreed bart-degreed deleted the routing-links branch May 28, 2021 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect links when using custom route

3 participants