8000 generation with defined root by Yakwilik · Pull Request #140 · easyp-tech/easyp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

generation with defined root #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2025

Conversation

Yakwilik
Copy link
Contributor

Например. Мы хотим назначить корневой директорией генерации какую-то папку, чтобы импорты прописывать уже относительно неё. Тогда можно в конфиге сделать такой input

    - input_files_dir:
        path: "."
        root: "api/server"

такой input будет смотреть все файлы в директории "api/server", а импорты файлов внутри этой директории могут выглядеть так:

import "types.proto";

@Yakwilik
Copy link
Contributor Author
Yakwilik commented Apr 24, 2025

После обсуждения фичи решили, что не будем добавлять новое поле в конфиг, а реализуем фунционал в старом поле. При этом старый формат сделаем deprecated:

  inputs:
    - directory: api2 #deprecated
    - directory:
        path: "."
        root: "api/server"
    - git_repo:
        url: "github.com/google/gnostic@v0.7.0"
        sub_directory: "openapiv3"
  plugins:
        ....

При этом поле root можно оставлять пустым:

  inputs:
    - directory:
        path: "api2"
    - directory:
        path: "."
        root: "api/server"
    - git_repo:
        url: "github.com/google/gnostic@v0.7.0"
        sub_directory: "openapiv3"

@ZergsLaw ZergsLaw merged commit 0845717 into easyp-tech:main May 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0