Giter Club home page Giter Club logo

Comments (8)

rpgreen avatar rpgreen commented on September 24, 2024

We can definitely look into it. Just curious - why do you need them to be imported in canonical-reference form?

from aws-apigateway-importer.

AndreyStrib avatar AndreyStrib commented on September 24, 2024

I have Card model referenced in multiple models throughout API.
If it is imported in inlined form to aws gateway, resulting IOS SDK will contain different classes for each inlined Card model.
For example, Card model is used inside User model and inside Account model. In that case sdk will contain two different classes with the same content: User_card, Account_card.
In case we will be able to have swagger file imported in form of external reference, than it will lead to single Card class, reused throughout API (in our example, Card class will be used as in User as in Account class).
I hope my explanation makes sense. Let me know if more clarifications are needed

from aws-apigateway-importer.

rpgreen avatar rpgreen commented on September 24, 2024

That makes sense. Have you tested that the iOS SDK generates the correct classes if you manually create models with external references?

from aws-apigateway-importer.

AndreyStrib avatar AndreyStrib commented on September 24, 2024

Yes, I tested. It generates classes which are reusable throughout api.
Although in both cases of inlined or external references, there is currently bug in ios sdk generator, I described in this issue:
https://forums.aws.amazon.com/thread.jspa?threadID=216636&tstart=0
AWS guys promised to look at it shortly, I hope it will be fixed soon.

from aws-apigateway-importer.

rpgreen avatar rpgreen commented on September 24, 2024

We do have a fix for that issue coming out soon. It may be a bit longer to address the external reference issue. If you can get it working in the short-term please feel free to send a pull request.

from aws-apigateway-importer.

AndreyStrib avatar AndreyStrib commented on September 24, 2024

I've updated importer in a separate fork to replace all $ref in models with pattern "https://apigateway.amazonaws.com/restapis/{API_ID}/models/{ModelName}".
It does what I need. But model refs inlining is thrown away.
Not sure whether such referencing suites all cases. Are there cases where inlining is preferable?
Let me know if you want this to be sent in pull request.

from aws-apigateway-importer.

arabold avatar arabold commented on September 24, 2024

Here's a +1 on this. Just ran into exactly the same problem with models being inlined and thus bloating the SDK with duplicate classes unnecessarily. External references would be exactly what I need.

from aws-apigateway-importer.

rpgreen avatar rpgreen commented on September 24, 2024

Swagger/OpenAPI import is now generally available in the API Gateway REST API, the AWS CLI and all AWS SDKs. You can also import and export Swagger definitions using the API Gateway console. This release addresses many of the open issues and feedback in this repository.

I would encourage you to migrate your workflow to the standard AWS tools. aws-apigateway-importer will receive minimal support from the API Gateway team going forward.

Any feedback or issues with the new importer should be directed to the official API Gateway forums.

Thanks,
Ryan

from aws-apigateway-importer.

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.