Comments (3)
Regarding the search there should be query.Resources()
.
from scimd.
@alelb yes, I know it from some days and as I saw 3 days ago I do not like this ...
Please investigate whether there is the possibility to apply bindings at runtime on a map ... I do not thnk it is supported by gin framework, but hey let's try!
from scimd.
@leodido Apply bindings at runtime is a wrong way, even it was supported by gin. Those fields depends on the schema that's not static, like tags in structs. Furthermore, validation cannot be performed in a centralised way, due the different nature of rule checks required by the RFC
Marshalling functions should already throw an error when type mismatches (yeah, it's kind of validation, errors should be handled and reported to the clients as RFC mandates).
Then, write APIs have to check for required fields and enforce mutability rules.
Note that validation rules may be different across POST
, PUT
, and PATH
ops (eg. "immutable" means write-once field, so it's allowed by POST
but cannot be changed anymore with PUT
)
Also, some tasks to perform on incoming data are not validation steps, but filtering (ie. for "readOnly" fields)
Uniqueness validation on fields can be performed within the storage layer, by catching the db's error on unique-indexes. We have to handle this, we cannot use a simple validator.
Check this too, even my be I was wrong about "required".
from scimd.
Related Issues (20)
- Fix toResource method HOT 1
- Create successfully calls don't return the newly created resource HOT 5
- Check lastModified works as intended HOT 1
- What Contexts has to do when the ResourceType is nil? HOT 2
- Giving an empty ResourceType to Contexts() HOT 2
- query.Resource doesn't perform attributes projection when there aren't included and excluded attributes
- Auth features HOT 1
- If using gin binding features upgrade its validator to v9
- Code review HOT 2
- Endpoint for authenticated subject alias HOT 2
- Harness test suite HOT 1
- Verify that User resources returned by storage contain the x509Certificate attribute
- Filtering of static resources
- About $ref attribute and relations between resources HOT 6
- Schemas common attribute is not required when there is a custom configuration
- Filters should be case sensitive or not? HOT 3
- Hooks should be defined in the server implementation
- CanonicalValues check should be configurable via SPC configuration HOT 3
- Clarification about readOnly attributes 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 scimd.