Coder Social home page Coder Social logo

Comments (12)

iammukeshm avatar iammukeshm commented on August 23, 2024 1

I even tried to delete the ApiClient class and generated it again via CLI. Not able to replicate this issue. Seems to work fine.

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

found it... nevermind

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

I cannot get the script to run. Seems Client.Infrastructure project is outdated

from dotnet-starter-kit.

iammukeshm avatar iammukeshm commented on August 23, 2024

@kallievz , i usually navigate to src\apps\blazor\infrastructure\Api and run the following.

nswag run ./nswag.json

Make sure that your WebAPI is up and running. The webapi should be running on the port specified in the nswag.json file.

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

from cmd?

from dotnet-starter-kit.

iammukeshm avatar iammukeshm commented on August 23, 2024

yes @kallievz . make sure you have the nswag cli installed.

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

awesome, thanks

from dotnet-starter-kit.

iammukeshm avatar iammukeshm commented on August 23, 2024

please close this ticket if you think the issue is resolved.

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

regen worked, but now I cannot login. I can see the token Api being called, but not navigating to "/"

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

image

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

hi @iammukeshm
I regen'd the poco using cmd. But seems the json tags are different, login seems to hit the api, but that is where it stops.

I regenerated now again, and compared to the pre changed version. JsonProperty names is different, Could this be causing the issue? Setting i need to change on Nswag.Json file? Sorry all the questions, i am used to Asp.Net webforms dev, not the new sparkly generators.

image

from dotnet-starter-kit.

kallievz avatar kallievz commented on August 23, 2024

Got it to go camelCase by changing :
// Add framework services.
builder.Services
.AddRazorPages().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = null);

to :
// Add framework services.
builder.Services
.AddRazorPages().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase);

Not sure why, i was not looking forward to creating json annotation on all classes.

from dotnet-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.