Comments (14)
@fehguy This is great! I'm not sure if I can upload HTML5 file blobs via AJAX calls. But if that's possible, then we can have a button that uploads the JSON and downloads the zip file with a click of the button.
I'll be looking into this. Please keep us updated if anything changed on your side.
from swagger-editor.
HI @mohsen1 luckily it's not a blob upload--it's pure JSON. You can use the swagger-js client if you like, although it's probably easier to just use the ajax support with angular.
The payload for the post requests is just JSON data.
from swagger-editor.
@fehguy That's right. I saw curl
and I thought it needs to be an actual file! I'll be experimenting with this asap
from swagger-editor.
great--yes, i did that to keep it manageable on the CLI.
from swagger-editor.
@fehguy Almost there. We only need CORS support on your end. To try it out, checkout deploy-wip branch and run it.
from swagger-editor.
what endpoint are you hitting? I see it open to all:
curl -i http://generator.wordnik.com/online/api/gen/clients
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT
Access-Control-Allow-Headers: Content-Type
Content-Type: application/json
Content-Length: 38
Server: Jetty(9.1.3.v20140225)
["android","java","php","objc","docs"]
I'll try that branch
from swagger-editor.
I'm using 'http://generator.helloreverb.com/online/api/gen/client/'
Please see here
from swagger-editor.
When I run it, it's sending as a GET:
also the path should be as such:
http://generator.wordnik.com/online/api/gen/clients/{language}
for clients
and
http://generator.wordnik.com/online/api/gen/servers/{framework}
for servers
i think this changed from my initial deployment
from swagger-editor.
Also note that you can get a list of all the clients supported by calling this endpoint:
http://generator.wordnik.com/online/api/gen/clients
or
http://generator.wordnik.com/online/api/gen/servers
which will be handy for populating your drop-down.
from swagger-editor.
Please see latest deploy-wip
branch. I've updated it per your directions. I'm still getting CORS error
from swagger-editor.
Hi, it's still appending the JSON body to the query string. The error you're getting is because the URL is > 4096 bytes.
from swagger-editor.
@fehguy for some reason I thought jQuery's setting for method is actually method. It's type
!
83334e0 fixes it.
Now we are getting 500.
It's either the YAML file or backend has some errors.
from swagger-editor.
great checking
from swagger-editor.
@fehguy It's now in gh-pages
. I had to write this hacky code to make it work:
I need to get those properties from specs itself. Please guide me how can I do that?
This is going to be first Transform Filter we add to project. A Transform Filter is simply modifies the YAML generated JSON to JSON that Swagger apps accept. That way we can keep YAML clean yet having functional JSON output.
from swagger-editor.
Related Issues (20)
- Timeout using massive open api definition
- Swagger editor allows to define object with required attributes and no definition
- Callback reference imaginary error with OpenAPI 3.1
- SwaggerEditor@next: Integration [email protected] and enhance OpenAPI 2.0 experience HOT 1
- SwaggerEditor@next: Integration of latest [email protected] HOT 1
- SwaggerEditor@next: integration latest [email protected] and React@18 in backward compatible way HOT 1
- Console error when changing swagger key in Swagger 2.0 spec HOT 2
- SwaggerEditor@4: integrate [email protected] with React@18 HOT 2
- Swagger editor converter fails to convert nested properties from 2.0 to 3.x
- react-transition-group package no longer works with React@18 HOT 3
- Client HTML2 doesn't have parameters' defaults
- SwaggerEditor@next: validation table headers are not aligned properly
- SwaggerEditor@next: Add Google Analytics for SB hosted editor
- Swagger Editor Incorrectly Renders Examples for `deepObject` `explode:true` Parameters
- Swagger Editor show Structural error at openapi for 3.1.0 HOT 5
- SwaggerEditor@next: v5 not found on NPM registry HOT 1
- SwaggerEditor@next: add support for `queryConfigEnabled`
- Provide a way to optionally not send a request body if optional
- Update the version of the generated Dart code
- Validation error thrown when $ref used in the description field. HOT 3
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 swagger-editor.