jentic-openapi-transformer-redocly 1.0.0a31__py3-none-any.whl → 1.0.0a33__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import json
2
+ import os
2
3
  import shlex
3
4
  import tempfile
4
5
  from collections.abc import Sequence
@@ -17,7 +18,7 @@ __all__ = ["RedoclyBundlerBackend"]
17
18
  class RedoclyBundlerBackend(BaseBundlerBackend):
18
19
  def __init__(
19
20
  self,
20
- redocly_path: str = "npx --yes @redocly/cli@2.11.1",
21
+ redocly_path: str = "npx --yes @redocly/cli@2.14.3",
21
22
  timeout: float = 600.0,
22
23
  allowed_base_dir: str | Path | None = None,
23
24
  ):
@@ -25,7 +26,7 @@ class RedoclyBundlerBackend(BaseBundlerBackend):
25
26
  Initialize the RedoclyBundler.
26
27
 
27
28
  Args:
28
- redocly_path: Path to the redocly CLI executable (default: "npx --yes @redocly/cli@2.11.1").
29
+ redocly_path: Path to the redocly CLI executable (default: "npx --yes @redocly/cli@2.14.3").
29
30
  Uses shell-safe parsing to handle quoted arguments properly.
30
31
  timeout: Maximum time in seconds to wait for Redocly CLI execution (default: 600.0)
31
32
  allowed_base_dir: Optional base directory for path security validation.
@@ -108,7 +109,15 @@ class RedoclyBundlerBackend(BaseBundlerBackend):
108
109
  # TODO(francesco@jentic.com): raises errors in redocly for unknown reason
109
110
  # "--remove-unused-components",
110
111
  ]
111
- result = run_subprocess(cmd, timeout=self.timeout)
112
+ env = os.environ.copy()
113
+ env.update(
114
+ {
115
+ "REDOCLY_TELEMETRY": "off",
116
+ "REDOCLY_SUPPRESS_UPDATE_NOTICE": "true",
117
+ }
118
+ )
119
+
120
+ result = run_subprocess(cmd, env=env, timeout=self.timeout)
112
121
 
113
122
  # Check if bundling was successful based on return code
114
123
  if result.returncode != 0:
@@ -1,21 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jentic-openapi-transformer-redocly
3
- Version: 1.0.0a31
3
+ Version: 1.0.0a33
4
4
  Summary: Jentic OpenAPI Redocly Transformer Backend
5
5
  Author: Jentic
6
6
  Author-email: Jentic <hello@jentic.com>
7
7
  License-Expression: Apache-2.0
8
8
  License-File: LICENSE
9
9
  License-File: NOTICE
10
- Requires-Dist: jentic-openapi-common~=1.0.0a31
11
- Requires-Dist: jentic-openapi-transformer~=1.0.0a31
10
+ Requires-Dist: jentic-openapi-common~=1.0.0a33
11
+ Requires-Dist: jentic-openapi-transformer~=1.0.0a33
12
12
  Requires-Python: >=3.11
13
13
  Project-URL: Homepage, https://github.com/jentic/jentic-openapi-tools
14
14
  Description-Content-Type: text/markdown
15
15
 
16
16
  # jentic-openapi-transformer-redocly
17
17
 
18
- A Python library that provides OpenAPI document bundling functionality using [Redocly CLI](https://redocly.com/docs/cli/). This package is part of the Jentic OpenAPI Tools ecosystem and implements the transformer backend pattern for bundling OpenAPI documents by resolving external references.
18
+ A Python library that provides OpenAPI document bundling functionality
19
+ using [Redocly CLI](https://redocly.com/docs/cli/). This package is part of the Jentic OpenAPI Tools ecosystem and
20
+ implements the transformer backend pattern for bundling OpenAPI documents by resolving external references.
19
21
 
20
22
  ## Features
21
23
 
@@ -25,7 +27,6 @@ A Python library that provides OpenAPI document bundling functionality using [Re
25
27
  - **Timeout Configuration**: Configurable timeout for long-running bundling operations
26
28
  - **Type Safety**: Full type hints and comprehensive documentation
27
29
 
28
-
29
30
  ## Installation
30
31
 
31
32
  ```bash
@@ -33,13 +34,14 @@ pip install jentic-openapi-transformer-redocly
33
34
  ```
34
35
 
35
36
  **Prerequisites:**
37
+
36
38
  - Node.js and npm (for Redocly CLI)
37
39
  - Python 3.11+
38
40
 
39
41
  The Redocly CLI will be automatically downloaded via npx on first use, or you can install it globally:
40
42
 
41
43
  ```bash
42
- npm install -g @redocly/cli
44
+ npm install -g @redocly/cli@2.14.3
43
45
  ```
44
46
 
45
47
  ## Quick Start
@@ -122,7 +124,8 @@ The bundler accepts the following input formats (returned by `accepts()` method)
122
124
 
123
125
  ### Integration Tests
124
126
 
125
- The integration tests require Redocly CLI to be available. They will be automatically skipped if Redocly is not installed.
127
+ The integration tests require Redocly CLI to be available. They will be automatically skipped if Redocly is not
128
+ installed.
126
129
 
127
130
  **Run the integration test:**
128
131
 
@@ -137,17 +140,21 @@ uv run --package jentic-openapi-transformer-redocly pytest packages/jentic-opena
137
140
  ```python
138
141
  class RedoclyBundlerBackend(BaseBundlerBackend):
139
142
  def __init__(
140
- self,
141
- redocly_path: str = "npx --yes @redocly/cli@2.11.1",
142
- timeout: float = 600.0,
143
- allowed_base_dir: str | Path | None = None,
143
+ self,
144
+ redocly_path: str = "npx --yes @redocly/cli@2.14.3",
145
+ timeout: float = 600.0,
146
+ allowed_base_dir: str | Path | None = None,
144
147
  ) -> None
145
148
  ```
146
149
 
147
150
  **Parameters:**
151
+
148
152
  - `redocly_path`: Path to Redocly CLI executable
149
153
  - `timeout`: Maximum execution time in seconds
150
- - `allowed_base_dir`: Optional base directory for path security validation. When set, all document paths are validated to be within this directory, providing defense against path traversal attacks. When `None` (default), only file extension validation is performed (no base directory containment check). Recommended for web services or untrusted input (optional)
154
+ - `allowed_base_dir`: Optional base directory for path security validation. When set, all document paths are validated
155
+ to be within this directory, providing defense against path traversal attacks. When `None` (default), only file
156
+ extension validation is performed (no base directory containment check). Recommended for web services or untrusted
157
+ input (optional)
151
158
 
152
159
  **Methods:**
153
160
 
@@ -155,6 +162,7 @@ class RedoclyBundlerBackend(BaseBundlerBackend):
155
162
  - `bundle(document: str | dict, base_url: str | None = None) -> str`: Bundles an OpenAPI document
156
163
 
157
164
  **Exceptions:**
165
+
158
166
  - `TypeError`: Document type is not supported
159
167
  - `RuntimeError`: Redocly execution fails or produces invalid output
160
168
  - `SubprocessExecutionError`: Redocly times out or fails to start
@@ -0,0 +1,8 @@
1
+ jentic/apitools/openapi/transformer/bundler/backends/redocly/__init__.py,sha256=L6eYm5G2n89k0Ufwl4ZRuDV9gHs7WWUsesJux7nWLCU,6229
2
+ jentic/apitools/openapi/transformer/bundler/backends/redocly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ jentic_openapi_transformer_redocly-1.0.0a33.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
4
+ jentic_openapi_transformer_redocly-1.0.0a33.dist-info/licenses/NOTICE,sha256=pAOGW-rGw9KNc2cuuLWZkfx0GSTV4TicbgBKZSLPMIs,168
5
+ jentic_openapi_transformer_redocly-1.0.0a33.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
6
+ jentic_openapi_transformer_redocly-1.0.0a33.dist-info/entry_points.txt,sha256=X61t3p9y4Sco-tJPkoNj3Px_6uii-xbYSzWI45N5Akg,149
7
+ jentic_openapi_transformer_redocly-1.0.0a33.dist-info/METADATA,sha256=LbtvV2DeB4pq7pF6NoSPy5zyu6d8IeU_pkWzImVezdY,5207
8
+ jentic_openapi_transformer_redocly-1.0.0a33.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- jentic/apitools/openapi/transformer/bundler/backends/redocly/__init__.py,sha256=HqLvEf87udVJRGk-eo-ZJ1T5aoVdIb6Sf747A_DtB1Y,5989
2
- jentic/apitools/openapi/transformer/bundler/backends/redocly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- jentic_openapi_transformer_redocly-1.0.0a31.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
4
- jentic_openapi_transformer_redocly-1.0.0a31.dist-info/licenses/NOTICE,sha256=pAOGW-rGw9KNc2cuuLWZkfx0GSTV4TicbgBKZSLPMIs,168
5
- jentic_openapi_transformer_redocly-1.0.0a31.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
6
- jentic_openapi_transformer_redocly-1.0.0a31.dist-info/entry_points.txt,sha256=X61t3p9y4Sco-tJPkoNj3Px_6uii-xbYSzWI45N5Akg,149
7
- jentic_openapi_transformer_redocly-1.0.0a31.dist-info/METADATA,sha256=FaqzFxbEyQYsPg76owC6l0jiIjts4bypE5WzQmoVTNM,5176
8
- jentic_openapi_transformer_redocly-1.0.0a31.dist-info/RECORD,,