Coder Social home page Coder Social logo

Remove old sub-resource syntax about rest-layer HOT 4 OPEN

tgirod avatar tgirod commented on June 11, 2024
Remove old sub-resource syntax

from rest-layer.

Comments (4)

tgirod avatar tgirod commented on June 11, 2024 2

@smyrman thanks for the explanation. I might have a swing at that next month.

from rest-layer.

smyrman avatar smyrman commented on June 11, 2024

This is related to #77.

Long story short, the second approach (the newest syntax) is recommended, and should work for more cases. The first approach (the earliest implementation of sub-schemas) should be deprecated, but some code still exists that only considers the earlier syntax.

My plan for solving this and other issues, is to do a proto-type for a new schema package design. However my progress have been (and is going to be) extremely slow.

from rest-layer.

smyrman avatar smyrman commented on June 11, 2024

Since the scope of #77 has grown, and my progress is expected to be very slow btw. It might be good to keep this issue open, if anyone wants to fix it against the current design.

I would recommend to remove the Schema property in the schema.Field type, and updates the documentation to recommend using the Object validator approach for sub-schemas. When doing this, it's a good opportunity to spot any code that relies on the removed field, and rewrite it to work with an Object validator (preferably through use of interfaces, so that AllOff/AnyOff/Dict etc. will also work).

I am happy to accept/review any PR with such changes, but am afraid I won't have time to write the code.

from rest-layer.

smyrman avatar smyrman commented on June 11, 2024

Renamed to reflect the work that is to be done.

from rest-layer.

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.