Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Swagger Conversion and Variables #11147


User avatar
0
ayoyusuf created

Please answer the following questions before submitting an issue.

  • What is your product version? - 11.2
  • What is your product type (Angular or MVC)? - Angular
  • What is product framework type (.net framework or .net core)? .net core

When I generate DTOs and it converts it to Swagger variables, I am struggling with the Logic, as I need to understand the relationship between my variable name and the swaggwer variable name

My application DTO variable names as defined: GLSalesAccount GLCOGAccount PaymentMethodID AmountPaid UndistributedAmount

Automated Swagger created for the DTO: glSalesAccount glcogAccount paymentMethodID amountPaid undistributedAmount

Please why is GLCOGAccount not glCOGAccount

what is the logic for it to turn to glcogAccount?


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ayoyusuf

    Do you see those names on swagger UI or on Angular service-proxies.ts ?

  • User Avatar
    0
    ayoyusuf created

    these names are on swagger UI and in the Angular projects (both typescript and html). So, the whole process completes with no errors. Just need to understand the basis/logic to enable the programmers add their own processes without errors.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We are using https://github.com/domaindrivendev/Swashbuckle.AspNetCore to generate swagger endpoint. By default, it should start with a upper case letter.

    1. Could you check what is the name of CreateEditionDto on your swagger endpoint ?
    2. Is it possible that your team changed the Swashbuckle configuration ?
  • User Avatar
    0
    ayoyusuf created

    See the CreateEditionDto below.

    our team didn't even know about the Swashbuckle so no we would not even attempt to make changes to a configuration we don't know what would happen.

    CreateEditionDto{ edition* EditionCreateDto{ id integer($int32) nullable: true displayName* string dailyPrice number($double) nullable: true weeklyPrice number($double) nullable: true monthlyPrice number($double) nullable: true annualPrice number($double) nullable: true trialDayCount integer($int32) nullable: true waitingDayAfterExpire integer($int32) nullable: true expiringEditionId integer($int32) nullable: true } featureValues* [NameValueDto{ name string nullable: true value string nullable: true }] }

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @ayoyusuf

    I tested it. Normally your DTO should be GLCOGAaccount. Does this problem only occur in DTO's that you produce or in all created DTO's?