GithubHelp home page GithubHelp logo

Comments (9)

adamaltman avatar adamaltman commented on August 15, 2024 2

@mosheeshel you will want to look for our next major version. 1-2 weeks. You'll be able to write rules to ensure compliance across both docs and gateway (and it will be fast to execute).

In progress PR: #146

from redocly-cli.

RomanHotsiy avatar RomanHotsiy commented on August 15, 2024 1

Hey @mosheeshel!

Thanks for reaching out!

Have you seen https://github.com/Redocly/create-openapi-repo?

It covers the use case 1

As for the use case 2 there is a major bottleneck: there is no reliable and fast yaml AST parser out there so splitting loses formatting and comments which is not acceptable for bundle->edit->debundle->review->commit flow.

from redocly-cli.

mosheeshel avatar mosheeshel commented on August 15, 2024 1

A 337 files PR, goodness gracious!

from redocly-cli.

mosheeshel avatar mosheeshel commented on August 15, 2024

Thanks @RomanHotsiy for the quick response.
I saw the repo previously, but missed the split functionality, I thought it was more like a template repo.
Since it uses the CLI for the other things, I wonder why the split isn't in the CLI as well.

Regarding your answer on **2 **, isn't the loss of data/format on de-bundle issue relevant for 1 as well?
I would assume the existing split functionality works in a somewhat deterministic way (i.e. two runs will produce the same output - so it might be a cool functionality to test - sacrificing some data - or is it really slow (how slow)?

from redocly-cli.

adamaltman avatar adamaltman commented on August 15, 2024

@mosheeshel on issue 1, you generally split once and review it. Because the split is typically a one-time activity, one-time review is acceptable. It is true we lose comments but also single file formats are often machine generated and often have few (if any) comments.

The splitting typically leads to further preference-based restructuring.

Regarding number 2, we’re looking to integrate this tool into various authoring tools (eg VS Code), to offer a consistent authoring experience. Even to make this practical we had to improve the performance (we have an alpha which we hope to release in 1-2 weeks). Of course, none of this is obvious with a. “Pet store” type of API, but with large enterprise APIs

Also, peer review is much easier to do in a split repo format in a tool like GitHub. A diff on a 30k line YAML or JSON file is more painful to understand the level of nesting it may be at, etc... Therefore, we are advocates of keeping the source of truth in a split format in a GitHub repository.

from redocly-cli.

mosheeshel avatar mosheeshel commented on August 15, 2024

@adamaltman thanks for clarifying.

We also use a split file solution (we wrote our own bundler I think before yours was available) - with a ~200 R&D group it's likely that several teams are working on multiple APIs at the same time - this reduces friction considerably, also they can own their sections. However we do have an issue of speed in previewing changes, our tool is not stand alone and also verifies compliance with our API Gateway configuration (ensuring the paths of both docs and gateway match, and certain requirements are filled in the docs).

from redocly-cli.

adamaltman avatar adamaltman commented on August 15, 2024

Now, I think both use cases are valid, even with the caveat that the split->bundle will be lossy with respect to YAML comments/format. I've thought about it more and think, "so what?" If it enables teams to be more productive, great. It means it is split to an opinionated split structure. That is one possible drawback -- eventually if there is demand, perhaps that split algo and structure could be configurable. However, we might never need that level of configuration?

So effectively, I will morph this proposal into bring the split command into openapi-cli. Maybe we can morph create-openapi-repo into more of a template repo?

from redocly-cli.

mosheeshel avatar mosheeshel commented on August 15, 2024

I think it's a good direction, I think an opinionated solution is not a bad idea to begin with, it helps form opinions 🙂 especially that there is a willingness to support configuration of there is demand.
The lossiness can also be fixed at least for the comment loss, again if there ever is demand.
The back & forth capability makes it a more useful tool IMO

from redocly-cli.

andriyl avatar andriyl commented on August 15, 2024

Closed by #206

from redocly-cli.

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.