Coder Social home page Coder Social logo

Comments (4)

timotheeguerin avatar timotheeguerin commented on June 1, 2024

This can often happen when you have anonymous schemas in your spec and autorest will try to give it a name like the parent schema name + the property name (e.g. Array + Itemschema), can you share the spec?

I do not believe you can suppress that and if you did it would then cause some invalid code to be generated where 2 classes/type will have the same name.

from autorest.

Strandedpirate avatar Strandedpirate commented on June 1, 2024

Thanks, yes, the spec is here. Unfortunately its a third party that we are about to pay for their service, and its not likely they will fix their spec.

https://af.api.sellercloud.com/rest/swagger/docs/v1

from autorest.

timotheeguerin avatar timotheeguerin commented on June 1, 2024

Hi @Strandedpirate the errors seems to be coming from non named enums inside of arrays there is 9 of them. for example if you search for the one with this description

 0 = Local_Store ,  1 = eBayOrder ,  2 = eBaySingleItem ,  3 = Yahoo ,  4 = Amazon ,  5 = PriceGrabber ,  6 = Website ,  7 = Buy ,  12 = NewEggMall ,  15 = Magento ,  16 = QuickBooks ,  17 = RMS ,  18 = Cart32 ,  19 = Sears ,  20 = FBA ,  21 = Wholesale ,  22 = Overstock ,  23 = NewEggdotcom ,  24 = Etsy ,  25 = Bonanza ,  26 = PriceFalls ,  27 = Wayfair ,  28 = UnbeatableSale ,  29 = VendorCentral ,  30 = Hayneedle ,  31 = SmartBargains ,  32 = uBid ,  33 = ATGStores ,  34 = StacksAndStacks ,  35 = Sharkstores ,  36 = BestBuy ,  37 = Kohls ,  38 = Staples ,  39 = OneStopPlus ,  40 = Meijer ,  41 = Sonsi ,  42 = Walmart ,  43 = HSN ,  44 = NewEgg_Business ,  45 = KMart ,  46 = Wish ,  47 = SPRichards ,  48 = FingerHut ,  49 = Groupon ,  50 = Walmart_Marketplace ,  51 = ShopHQ ,  52 = PriceMinister ,  53 = GS ,  54 = DrugStore ,  55 = MercadoLibre ,  56 = JET ,  57 = ElevenMain ,  58 = SearsVendor ,  59 = Choxi ,  60 = TradeMe ,  61 = Tanga ,  62 = Target ,  63 = GrouponMarketplace ,  64 = Reverb ,  65 = BedBathAndBeyond ,  66 = Dropship_Central ,  67 = DSW ,  68 = Houzz ,  69 = Gilt ,  70 = BestBuyDS ,  71 = TopHatter ,  72 = HomeDepot ,  73 = MassGenie ,  74 = Cdiscount ,  75 = GrouponGateway ,  76 = SBN ,  77 = GoogleExpress ,  78 = Target_Plus ,  79 = WFS ,  80 = BackMarket

Autorest is currently in maintenance mode as we are moving to a new language for defining apis so changing anything related to naming or investing too much time here is not something we can really do.

I know the experience here is pretty bad to figure out which ones are the offending schemas but autorest does also provide some directive you can use to patch the swagger so you don't need to actually change the file.
For example: https://github.com/Azure/autorest/blob/main/docs/generate/directives.md

I would maybe look at some alternative openapi generators as autorest might not see much upgrades in the future

from autorest.

Strandedpirate avatar Strandedpirate commented on June 1, 2024

Ok, thanks. I'll check out the directive and see if I can get around this issue.

from autorest.

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.