Commit ebd16a4
authored
fix: Specifications from parents of Sphinx source directory (#264)
* fix: Specifications from parents of source dir
If a spec is referenced with `../../../and-so-on/`
to access a file from a parent of the Sphinx
source directory, the resolved path can be
a path that is a parent of the output HTML directory.
By replacing the ".." with "dot-dot" in the output
of the Sphinx relfn2path function, this fix
ensures that the spec is copied correctly to
a subdirectory of the output `_static` directory.
For example, expect to see `_static/dot-dot/dot-dot/openapi.yaml`.
That path would otherwise be a parent of the output HTML.
Signed-off-by: Mike McKiernan <[email protected]>
* chore: Update version for patch release
Signed-off-by: Mike McKiernan <[email protected]>
---------
Signed-off-by: Mike McKiernan <[email protected]>1 parent c6c618e commit ebd16a4
File tree
4 files changed
+40
-3
lines changed- swagger_plugin_for_sphinx
- tests
4 files changed
+40
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
3 | 20 | | |
4 | 21 | | |
5 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| 263 | + | |
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
| |||
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
281 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
282 | 296 | | |
283 | 297 | | |
284 | 298 | | |
| |||
303 | 317 | | |
304 | 318 | | |
305 | 319 | | |
306 | | - | |
| 320 | + | |
| 321 | + | |
307 | 322 | | |
| 323 | + | |
308 | 324 | | |
309 | 325 | | |
310 | 326 | | |
| |||
316 | 332 | | |
317 | 333 | | |
318 | 334 | | |
| 335 | + | |
0 commit comments