Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves existing tests for ID obfuscation by:
long
instead ofint
as the internal ID typeResourceGraphBuilder
now has aRemove
method, which enables the removal of a resource type from the resource graph, after assembly scanning has run. This is used to exclude theObfuscatedIdentifiable
abstract base class, which is not supposed to be exposed externally.A new annotation
[HideResourceIdTypeInOpenApi]
is added to theJsonApiDotNetCore.OpenApi.Swashbuckle
package, which can be used to hide the underlying type of IDs. Before, the OpenAPI schema looked like:With the new annotation added to
ObfuscatedIdentifiable
(which implicitly applies to all derived types), it becomes:This is useful in the case of ID obfuscation because while the internal resource ID types are
long
, the publicly exposed obfuscated IDs are strings. We shouldn't make the internal ID type (which is an implementation detail) externally observable.Closes #1067, closes #1603.
QUALITY CHECKLIST