question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add setting to change the URI type in generated clients

See original GitHub issue

I have a C# DTO model for input in my API that takes a string with the DataType annotation for a URL.

[DataType(DataType.Url)]
public string Url { get; set; }

I am using the generated C# client in Razor pages and would have expected the client to use the same sort of annotations but instead I am seeing it come in as a System.Uri.

Is it possible that I missed something in the settings?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
herrahlstromcommented, Oct 21, 2022

Hi,

I made a pull request that should solve this issue in NJsonSchema https://github.com/RicoSuter/NJsonSchema/pull/1567

0reactions
RicoSutercommented, Feb 15, 2021

I’m fine adding this config similar to the array type configs.

add complexity to the template

It would only be a C# level config, would not need any template changes (no additional complexity there).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uri Class (System)
The Uri class defines the properties and methods for handling URIs, including parsing, comparing, and combining. The Uri class properties are read-only; to ......
Read more >
How to change webservice url endpoint? - java
The first option is to change the BindingProvider.ENDPOINT_ADDRESS_PROPERTY property value of the BindingProvider (every proxy implements javax.
Read more >
Add a redirect URI to a login client
The best way to avoid problems like that is to first use the GET method to return all the current property values for...
Read more >
Setup | Authentication
Click Create credentials > OAuth client ID and for Application type select Web application ... Add the URI of your website to Authorized...
Read more >
Configure your app | DocuSign
Select ADD URI, which displays a new text box for you to enter the URI (URL) where your authenticated users will be redirected....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found