Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
3 months ago
Solved

Is there a way to sync only the openapi.json when using Git?

Originally posted by user arondeparon to the Stoplight Community on 11/02/2022 at 05:25 ET.

See question. I am really uncomfortable with the fact that when using Git, Stoplight synchronises my entire repository.

We keep OpenAPI documentation bundled with our source code, so by linking Stoplight to Git, our entire codebase is downloaded and synchronised which is obviously not something that we want.

Is there a way around this?

  • Skinghar (Staff) [11/02/2022 - 10:22 ET]

    Hello arondeparon, We are currently working to solve this issue, eventually we will no longer expose the entire Git repository, but instead only have the files relevant to Stoplight. This is in our long term roadmap. There may be a clever way to work around this by ignoring non-api source code in the mean time, however I don't have anything specific to share at this point in time. Thank you for reaching out.

    We found some documentation to assist you. https://meta.stoplight.io/docs/platform/a63ea8365060b-configure-projects

3 Replies

  • Stoplight's avatar
    Stoplight
    Community Manager

    Skinghar (Staff) [11/02/2022 - 10:22 ET]

    Hello arondeparon, We are currently working to solve this issue, eventually we will no longer expose the entire Git repository, but instead only have the files relevant to Stoplight. This is in our long term roadmap. There may be a clever way to work around this by ignoring non-api source code in the mean time, however I don't have anything specific to share at this point in time. Thank you for reaching out.

    We found some documentation to assist you. https://meta.stoplight.io/docs/platform/a63ea8365060b-configure-projects

    • Stoplight's avatar
      Stoplight
      Community Manager

      arondeparon (OP) [11/02/2022 - 11:14 ET]

      Thanks. The inclusion/exclusion does not really work for me because I simply want to exclude everything except the things that I specify. I could not get that to work with those filters.

      The main reason for wanting to use Git is that I need a way to see what is pending publication. Without Git, you just get to hit "publish" and hope for the best

      So the real question/request-for-feature is having the ability to see what is pending publication.

      • Stoplight's avatar
        Stoplight
        Community Manager

        Skinghar (Staff) [11/02/2022 - 13:16 ET]

        Stoplight Web Projects are write and publish. While you can create versions, there is no support for merging versions, so you really are just creating a distinct, unique copy of a web project. Here a a link to a doc that might help. https://meta.stoplight.io/docs/platform/252039ebe8fb2-project-settings#versions

        Other than that you can use preview mode to see what specific topic will look like. You can also use a Table of Contents file in a web project to control what gets added to your side panel. https://meta.stoplight.io/docs/platform/ac20d67e16ae6-project-sidebar

        We do have a "Review changes" feature that is on our roadmap, to help with non-git projects to provide the same experience as the git commit and push dialog. A future way to review changes you've made to a project's version before publishing them.