Giter Club home page Giter Club logo

Comments (6)

solnic avatar solnic commented on August 10, 2024 1

@flash-gordon ahh yeah we talked about this recently. Yeah JSON::Object makes sense, and the error messages should be changed in 2.0.0s ๐Ÿ™‚ anyhow, not strictly related to this issue here, we can follow-up in a discourse thread (I'll create it later).

@UsAndRufus could you open a PR with the example updated like in my comment above?

from rom-rb.org.

solnic avatar solnic commented on August 10, 2024 1

@UsAndRufus oh it's this one

from rom-rb.org.

solnic avatar solnic commented on August 10, 2024

Thanks, for now let's do this:

module GitHub
  module Resources
    class Organizations < ROM::Relation[:http]
      schema(:orgs) do
        attribute :id, Types::Integer
        attribute :name, Types::String
        attribute :created_at, Types::JSON::Time
        attribute :updated_at, Types::JSON::Time
      end

      def by_name(name)
        append_path(name)
      end
    end
  end
end

in the future, we probably want to add Types::JSON::(String,Integer) even though they'd be plain definitions, but it's a weird "gotcha" that is clearly problematic. We already did this with Types::Params::String that originally wasn't present. /cc @flash-gordon makes sense to you?

from rom-rb.org.

flash-gordon avatar flash-gordon commented on August 10, 2024

it does. Not sure about arrays or object. Mb JSON::Object and alias for hash? This can have implications for dry-schema though (that error messaging thing again)...

from rom-rb.org.

UsAndRufus avatar UsAndRufus commented on August 10, 2024

@solnic sure, which is the correct file to update? I can see it in the rom-rb.org repo and the rom-http repo. Is there a Rake task or something that copies them across or will both need updating manually?

from rom-rb.org.

UsAndRufus avatar UsAndRufus commented on August 10, 2024

Closing this as PR that addresses it is merged :)

from rom-rb.org.

Related Issues (20)

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.