Comments (3)
@ahx Thanks for the issue + PR. I'd personally prefer option 2 as it would tell you exactly what's happening. Making the library return nil
would lead to errors like undefined method 'ABC' for nil:NilClass (NoMethodError)
when people try to interact with it. In this instance failing fast is preferable imo
Raising a custom error would also allow this to be merged without it being a breaking change as OasParser::PathNotFound
could extend StandardError
from oas_parser.
I think I would go with 1️⃣, because that way consuming apps don't have to handle exceptions for control flow.
Also it was very easy to implement. Here's a PR: #18
from oas_parser.
Sounds like a plan!
from oas_parser.
Related Issues (16)
- Parsing `allOf` for XML and JSON
- Is json_schema actually a dependency? HOT 1
- Support integer status codes in responses HOT 3
- Response schema does not support strings HOT 1
- allow parameters in: body instead of requestBody for Swagger HOT 1
- doesn't resolve external references HOT 2
- recurrent references not allowed HOT 3
- KeyError when parsing reports.yml HOT 5
- Parsing the `tags` field of the root OpenAPI document HOT 1
- example: 0755 returns example: 493 when parsing
- uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState
- Dependency conflict with Sinatra (Mustermann)
- problem parsing azure netapp swagger circular reference HOT 1
- Publish the API? HOT 3
- Parsing the "components" section HOT 4
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 oas_parser.