Comments (3)
As an FYI, this gulp task and feature isn't officially documented in the repo since it was for the developers of the project only. If you'd like to get it to work, first install Swagger-Codegen locally as described at https://github.com/swagger-api/swagger-codegen. I believe you already have this working. Next, you should be able to run "gulp generate_sdk" when in the API directory and successfully generate a new SDK folder and sub-files from the Swagger definition YAML file.
As you mentioned, between Angular 4 changes and Swagger Codegen changes, the signatures for some of the initialization options have changed, with an optional configuration. I just pushed a commit to update the project to use the latest generated SDK and pass in a null for the configuration options, which are optional.
Additionally, Angular 4 made some changes to their HTTP service to have an enum instead of a string for the HTTP methods, so I've updated the spacefinder-api-service.ts file accordingly, to properly handle this.
All should be working fine now with the latest Swagger Codegen, Ionic, and Angular 4 so let me know if you run into other issues.
Justin
from aws-serverless-auth-reference-app.
Thank you @justonian for detailed explanation. While studying this project, I went to the code and found this really nice feature gulp generate_sdk
- to build api just from swagger definition file.
I later found that the problem was with version of swagger-codegen
. I installed it with Homebrew package manager and the version installed was v2.2.3. After spending few hours on it, I found that actual version should have been v2.2.1. So I downloaded old jar file and made following changes to the api/util/swagger.js
file.
- let cmd = spawn('swagger-codegen', ['generate', '-i', swaggerDir + '/SpacefinderAPI-exported.yml', '-l', 'typescript-angular2', '-o', apiSdkDir]);
+ let cmd = spawn('java', ['-jar', '/path/to/my/swagger-codegen-cli-2.2.1.jar', 'generate', '-i', swaggerDir + '/SpacefinderAPI-exported.yml', '-l', 'typescript-angular2', '-o', apiSdkDir]);
These changes worked for me.
from aws-serverless-auth-reference-app.
Try again now with the latest version. I did have to make a few updates the other day to support it given their new initialization signature, but those are now made and pushed to this repo.
If you download the latest code from this repo and try it with the latest swagger codegen version, it should work fine now.
from aws-serverless-auth-reference-app.
Related Issues (20)
- Side menu version HOT 1
- CAN'T CONVERT IONIC TO PWA..!!
- How can you add a second IdP without losing roles logic?
- "Bookings" failed on showing booked resource list-Run in a web browser HOT 1
- Store Login data and auto login
- Tighten Up Lambda Execution Role Policy By Using Policy Variable (identity ID or Subscriber ID) Fine-Grained Access to DynamoDB HOT 5
- Can not connect using putty and ec2-user HOT 6
- Is the user information in account-management.service.ts secure?
- AWSCognito is not defined in account-management.service.ts
- lambda wrapper functions break any Promise returns
- api create_sdk command fails HOT 2
- Token refresh
- Cannot run gulp deploy HOT 2
- Generated Java API SDK has lots of Syntax errors HOT 2
- Could you provide some sample Java code for Cognito UserPool Authorizer client
- Account Image is not persisted
- How can i get my temporary credentials for my federated Id token ? HOT 1
- gulp deploy fails on lambda creation - repo needs to be updated for supported nodejs version HOT 3
- Demo to migrate to AppSync and GraphQL?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-serverless-auth-reference-app.