Base solution for your next web application

Activities of "area8.tech"

Hello @ismcagdas, thank you for your answer. I tried to add a DocumentFilter and a SchemaFilter as described in https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/451 this page but that code has errors and methods and classes don't match (it seems to be related to an old version of the library). I tried to fix that code but seems too different.

Then I found this Package NJsonSchema and i added the code

    [JsonConverter(typeof(JsonInheritanceConverter), "discriminator")]
    [KnownType(typeof(Dog))]
    public class Animal { ... }
    
    public class Dog { ... }

and it works, infact the returned JSON has the discriminator field, but it is not added to the Swagger, so NSwag.js does not update the angular "service proxies".

Any hint? Agostino

Question

Hello, I have a question about how swagger generates the JSON about the subclasses. I added the

    [JsonConverter(typeof(JsonInheritanceConverter), "discriminator")]
    [KnownType(typeof(SubClass))]

decorators on the superclass and I added the Package NJsonSchema as I see on their documentation, but the generated JSON doesn't have the discriminator field and the subclasses aren't generated, so I cannot use them in the Angular FrontEnd

How can I resolve this? Thank you for your help. Agostino

Hi ryancyq, thank you for your reply! I ended up creating a ner angular app from scratch and manually add all the needed packages and components. It was an hard work, but now I have all the necessary .ts files and services and I can work only on html and scss (we use Carbon Design System for this project's frontend).

Thank you again, have a nice day

Hi, we need to remove Metronic stuff from the frontend. Is that possibile? I searched for already asked question, but many users wants to change theme. I found an old answer on SO: https://stackoverflow.com/questions/46497451/aspnetzero-ui-template-change/46498458#46498458 but it links to an old documentation that's no longer available.

Thanks, Agostino

Showing 1 to 4 of 4 entries