Giter VIP home page Giter VIP logo

Comments (8)

philsturgeon avatar philsturgeon commented on May 15, 2024 1

Example of a filter, the JSON Schema to OpenAPI conversion layer that goes into each of the different protocol things. wework/speccy#45

from oas-kit.

MikeRalphson avatar MikeRalphson commented on May 15, 2024

Cool. Will probably be implemented as an array of callbacks which can mutate the content. Do you think anyone is ever going to want to massage the text before it gets parsed by js-yaml ?

from oas-kit.

philsturgeon avatar philsturgeon commented on May 15, 2024

I can only guess, but for me no.

from oas-kit.

MikeRalphson avatar MikeRalphson commented on May 15, 2024

Good, simpler the better.

from oas-kit.

MikeRalphson avatar MikeRalphson commented on May 15, 2024

options.filters is now an (optional) array of functions which take two parameters, data and options and must return the filtered data.

oas-kit should be a step towards re-integrating speccy with the new oas-resolver package and possibly oas-validator in the future (you would provide your own linter presumably which would be plugged in instead of oas-linter).

from oas-kit.

philsturgeon avatar philsturgeon commented on May 15, 2024

Sweet! Is this ready for me to rewrite speccy around or what's the deal?

from oas-kit.

MikeRalphson avatar MikeRalphson commented on May 15, 2024

I think the refactoring of swagger2openapi into oas-kit as a mono-repo is now stable. I don't believe you made any other changes to the resolver apart from the ability to plug in your JSON-Schema dialect converter? If that's the case, then switching over to using oas-resolver as a dependency should be pretty trivial.

It will take a little longer for me to work out whether the validator changes can be sync'd up again, and if so what changes if any are needed to the interface between the validator and the linter.

I'm happy to do anything to reduce the code duplication between the projects, but I know you were at least toying with the idea of using ajv (with better-ajv-errors) as the primary validator. oas-validator now has an option to do ajv first, last or never, but ajv-errors-are-still-pretty-shit :)

from oas-kit.

MikeRalphson avatar MikeRalphson commented on May 15, 2024

Work being done in wework/speccy#98

from oas-kit.

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.