Comments (4)
2013-05-31T04:05:15.419125+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:285:in `encode': "\xEF" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:285:in `generate'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:285:in `pretty_generate'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:165:in `format_example_data'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:174:in `format_example'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:159:in `block in load_recorded_examples'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:159:in `map'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:159:in `load_recorded_examples'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:42:in `initialize'
2013-05-31T04:05:15.419125+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:46:in `new'
2013-05-31T04:05:15.419456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:46:in `block in define_method_description'
2013-05-31T04:05:15.419456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:38:in `each'
2013-05-31T04:05:15.419456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:38:in `define_method_description'
2013-05-31T04:05:15.419456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/apipie_module.rb:18:in `method_missing'
2013-05-31T04:05:15.419456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/dsl_definition.rb:305:in `method_added'
Another unreadable record.
from apipie-rails.
After disabling code coverage for APIPIE_RECORD rspec the yml file looks fine. We have some tests covering binary & base64 uploads, after disabling them the file is parseable again.
Our CI system is now trying to load and stringify the examples file before every deploy, so an invalid file can't break the server anymore.
JSON.pretty_generate(YAML.load_file("doc/apipie_examples.yml"))
@Pajk what do you think of changing the overall file format to json instead of serializing a hash to yml, to parse it and serialize to json again?
from apipie-rails.
I remember a discussion about breaking the examples into smaller files, structured by controllers and actions (man I can't find it now :(, This was the first cat of the format, we have now much more input on how this could be improved.
Moving to json seems like a way to go.
from apipie-rails.
I've been hitting this error for a long time at
ruby-1.9.3-p484/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:124:in `block in visit_Psych_Nodes_Sequence': undefined method `first' for nil:NilClass (NoMethodError)
from ruby-1.9.3-p484/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:123:in `each'
Causing re-generation of examples to fail (until old file is removed) and of course also display fails. And this seems to happen in random manner.
I quickly tested this "json-record" branch, and it seemed to fix issue. So is this fix going to get merged to master someday?
from apipie-rails.
Related Issues (20)
- add support to say param1 or param2 required
- Report all missing required parameters instead of just the first HOT 2
- Mark params as deprecated HOT 1
- Enable Style/HashSyntax Ruby 1.9 HOT 2
- Getting So many Warnings while using apipie with Ruby 2.7.7 HOT 15
- Missing translation `apipie.returns`
- How to specify binary-type params HOT 3
- [v1.0] NoMethodError: undefined method `resource_id' for Apipie:Module HOT 2
- Generate multiple swagger-files HOT 7
- Swagger warnings for optional parameters even when using `property` HOT 2
- Swagger generation mixes up controllers with same name: HOT 4
- Apiepie::ParamErrors Inconsistent interface HOT 6
- Swagger JSON cannot parse Array of Hash in params HOT 3
- How do I specify a custom Description, I get "Another API description" HOT 2
- Discrepancy: `params` Defined as Array of Integer in Apipie appears as Array of Strings in Swagger File HOT 4
- Incorrect Representation of Array of Hashes in Swagger Output HOT 3
- How can I define a param group without duplicating what is defined in ActiveRecord model? HOT 1
- How to display an example for a request in Swagger? HOT 2
- Are multiple base url's possible
- "allow_blank" setting is not displayed in api doc 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 apipie-rails.