Comments (6)
@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.
@UsAndRufus oh it's this one
from rom-rb.org.
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.
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.
@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.
Closing this as PR that addresses it is merged :)
from rom-rb.org.
Related Issues (20)
- Feedback on ROM - Rails Setup HOT 5
- Auto-struct with custom classes - undefined method HOT 2
- Feedback on ROM - Rails Setup
- Set up auto-deployment HOT 1
- Rom website has Content Security Policy errors in iframe HOT 3
- Missing docs for pagination plugin HOT 2
- Broken link in Advanced section
- Fix all broken links HOT 3
- Localisation: Brazilian Portuguese HOT 1
- Explain how auto-struct subclassing works
- Error when running "Repositories ยป Writing Aggregates" sample HOT 1
- Feedback on ROM - Status HOT 1
- Feedback on ROM - Mapping
- Feedback on ROM - Quick Start HOT 3
- Feedback on ROM - Relations & Structs HOT 3
- Unclear documentation
- The "Edit on Github" link on rom-rb.org quick-setup points to the old rom-rb/rom-core github repository. HOT 1
- Feedback on ROM - Transactions HOT 3
- Feedback on ROM - Introduction
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 rom-rb.org.