Comments (3)
I agree. Would you mind opening a PR?
@mauchede WDYT?
from api-doc-parser.
I agree too.
This modification will be useful for api-platform/admin
. We will know the reason of the failure: if it is an 401
error, we can redirect to the login page.
from api-doc-parser.
@bdo : With the version 0.2.0
, it is now possible to handle error:
parseHydraDocumentation('https://demo.api-platform.com')
.then(
({api}) => {
// No error: you can use the "Api" instance.
},
({api, response, status}) => {
// An error occured: you can analyze "status" and "response" and handle the error here.
},
);
Note: In all cases, you retrieve an Api
instance. So if the error is allowed, you can return the Api
and continue the process.
@dunglas : IMO, this issue can be closed.
from api-doc-parser.
Related Issues (20)
- [DataProvider] Empty Headers and 401 response HOT 8
- Bug parsing OpenAPI https://netcoreblockly.herokuapp.com/swagger/v1/swagger.json
- 204 response code is invalid HOT 1
- Add a restrictions (or constraints) attributes in Field and Resource
- Entrypoint trailling slash is stripped from original entrypoint fetch.
- fetchResource loads actual items from the API due to wrong queryParameter
- Module not found: Can't resolve 'jsonref' HOT 6
- Why aren't hydra and openapi3 generating the same components HOT 1
- Test `src/openapi3/handleJson.test.ts` fails
- use 'OpenAPI link' to detect relations between entities HOT 1
- list and create endpoints aren't correctly matched
- Use the path specified in OpenAPI schema as the URL
- [Swagger parser] Exception thrown when a resource has no required fields.
- Migrate the library to TypeScript HOT 1
- Cannot convert undefined or null to object. HOT 3
- Cannot find name 'Nullable'
- TypeScript: Cannot find name 'Nullable' HOT 4
- TypeError: Cannot read property 'properties' of undefined; swagger.io openapi3
- [Hydra] Add correct types for Hydra
- Use https instead of http HOT 1
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 api-doc-parser.