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

Add support for namespaces #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add support for namespaces #31

wants to merge 1 commit into from

Conversation

LykaiosNZ
Copy link
Owner

@LykaiosNZ LykaiosNZ commented May 4, 2024

  • Adds Namespace field to definitions. This is always nullable even when a definition has a namespace, for consistency.
  • Adds includeNamespace optional parameter to WithId (defaults to false):
public const string Name = "user";
public const string? Namespace = "mynamespace";
public static string WithId(string id, bool includeNamespace = false) => includeNamespace ? $"mynamespace/user:{id}" : $"user:{id}";

The includeNamespace parameter is available even when the definition does not have a namespace for consistency, however the implementation will ignore this:

public const string Name = "user";
public const string? Namespace = null;
public static string WithId(string id, bool includeNamespace = false) => $"user:{id}";

Closes #24

+semver:minor

@LykaiosNZ LykaiosNZ added the enhancement New feature or request label May 4, 2024
@LykaiosNZ LykaiosNZ force-pushed the support-namespaces branch from cba847f to 6cdef36 Compare May 4, 2024 04:32
Add Namespace field to definition

Add includeNamespace optional parameter to WithId

Implementation of conditional inclusion of namespace for WithId

Make expression syntax creation local functions

+semver:minor
@LykaiosNZ LykaiosNZ force-pushed the support-namespaces branch from 6cdef36 to f37032f Compare May 4, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for namespaces
1 participant