Giter VIP home page Giter VIP logo

api_maker's People

Contributors

andersgm avatar dependabot-preview[bot] avatar dependabot[bot] avatar kaspernj avatar khuchuieva avatar koppen avatar robwu avatar zone31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

api_maker's Issues

Avoid the need to save generated javascript models in version control system

It doesn't add a lot of value to have the generated javascript models in version control.
Also, it would be nice to not have to run rails api_maker:generate_models every time a resource is changed.

So, it would be a great improvement, if they could be generated dynamically in development/test.
Then for production, as part of the build, you could run the api_maker:generate_models task.

Returning dates and times from Ruby to JS

If a Date- or Time attribute is returned in a resource, it will be read as a Date in JavaScript, because API maker knows the type of the attribute.

If you delegate or otherwise return a custom attribute (where the type is unknown), a Date or Time will be returned as a string.

It should be returned in Ruby as JSON as {type: :date, date: actual_date} or {type: :time, time: actual_time} and then automatically be converted to a Date in JS on the other side.

Returns error if value is array of hashes on nested_attributes

when saving array of hashes on nested_attributes (one-to-many) it returns error

undefined method `keys' for #<Array:0x00007f9959d4f838>
.../api_maker-396c2714060c/app/services/api_maker/validation_errors_generator_service.rb:71:in `check_nested_many_models_for_validation_errors'
.../api_maker-396c2714060c/app/services/api_maker/validation_errors_generator_service.rb:55:in `block in inspect_params'

https://github.com/kaspernj/api_maker/blob/master/app/services/api_maker/validation_errors_generator_service.rb#L53-L55

modelClassData.attributes should be an Object or Map

The current Array of attributes is fine if you only need to iterate through them all.
But I would like to look up the type of one attribute.
Having the attributes as either an Object or Map would be good for both those use cases.

spec for BootstrapStringInput is sensitive to timezone setting

I get this error, when running the spec.
Seems to be due to my machine running a different timezone than the CI.

  1) bootstrap - string input renders a datetime local field as sets the value correctly
     Failure/Error: expect(input[:value]).to eq "1985-06-17T10:30:00"
     
       expected: "1985-06-17T10:30:00"
            got: "1985-06-17T12:30:00"
     
       (compared using ==)
     
     
     
     # ./spec/system/bootstrap/string_input_spec.rb:28:in `block (2 levels) in <main>'

Client side validations

Extract Rails inspection data of validators to the client and let the client perform validation client side to save server side resources and make isValid work.

Rubygems.org

From README.md

gem "api_maker"

It doesn't work because the gem isn't on rubygems.org.
Could you please create the gem on rubygems.org?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.