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

[SCIM] Proposal: Load SCIMSchema from string #763

Open
johanndev opened this issue Jun 20, 2024 · 1 comment
Open

[SCIM] Proposal: Load SCIMSchema from string #763

johanndev opened this issue Jun 20, 2024 · 1 comment

Comments

@johanndev
Copy link

johanndev commented Jun 20, 2024

Currently, the SCIMSchemaExtractor.Extract() method expects a file path as input, which is immediately read and parsed into a JObject:

public class SCIMSchemaExtractor
{
public static SCIMSchema Extract(string filePath, string resourceType, bool isRootSchema = false)
{
var content = File.ReadAllText(filePath);
var jObj = JsonConvert.DeserializeObject<JObject>(content);

It would be convenient if there was a separate method that would accept a string directly instead of a filepath. That would make it easier to load schemas from other sources, e.g., Resource Files.

If you think this a worthwile addition, I could provide a proposal in a PR.

Thanks!

@simpleidserver
Copy link
Owner

Indeed, it would be useful to have another method that accepts a string as input. I'd be glad if you could make a pull request. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants