Skip to content

Add support for namespaces#31

Open
LykaiosNZ wants to merge 1 commit intomainfrom
support-namespaces
Open

Add support for namespaces#31
LykaiosNZ wants to merge 1 commit intomainfrom
support-namespaces

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