Giter VIP home page Giter VIP logo

Comments (3)

MalloD12 avatar MalloD12 commented on June 12, 2024

Hi @vtheuer,

Thank you for raising this issue for us. Currently, Liquibase does not validate JSON/Yaml schemas and to make that available a good amount of work is required. Our team has other priorities for the near future, but thanks to this issue and some others we have been working on we decided to consider adding a JSON/Yaml schema validator and put it in our backlog (for Liquibase 5). With that said, if you are keen to submit a PR for adding a change object validation to consider cases like the one you reported here that would be more than welcome, and we would be happy to review it or answer any question you might have.

Thanks,
Daniel.

from liquibase.

vtheuer avatar vtheuer commented on June 12, 2024

Hi @MalloD12,

I am indeed keen to submit a PR regarding this issue.

After skimming through the code, I believe the check cannot happen in the validate phase, as it operates on already-parsed changes. I think the code that should be updated is in AbstractChange.load. Would it be OK to throw that kind of exception during the parse phase ?

I'm having trouble understanding how tests are arranged, could you point out which unit and integration tests are linked to this method ?

Finally, don't hesitate to tell me if this is not the right place to have this discussion.

Thanks in advance,
Virgile.

from liquibase.

MalloD12 avatar MalloD12 commented on June 12, 2024

Hi @vtheuer,

Virgil in my opinion, updating AbstractChange.load() method could work, but I think that's not the right place. For the given case, doing a change like that one would be a workaround. Currently, these types of validation errors do not happen in XML format, because the XSD validations are triggered and prevent you from creating an invalid changelog. I think to fix this we should add similar support for JSON/YAML format, and to do that we can use the xml XSD schema (using a third-party library) as a starting point. If we create a PR updating the load() method that may work for this case, but we will need to remove that piece of logic in the future when the mentioned solution is implemented.

Thank you for proposing ideas, that's very appreciated by the team.

Daniel.

from liquibase.

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.