Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.1] - 2026-03-??

- Add OAS 3.1 support, cross-version warnings, and fix nullable spacing, by @dcode.
- Fix MARKDOWN style table separators to use minimum 3 hyphens (issue #39), reported by @michael-nok.

## [1.3.0] - 2025-11-19

- Add support for passing custom Jinja2 templates as an argument, by @sindrehan.

## [1.2.1] - 2025-07-30
Expand Down
2 changes: 1 addition & 1 deletion openapidocs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "1.3.0"
__version__ = "1.3.1"
VERSION = __version__
2 changes: 1 addition & 1 deletion openapidocs/mk/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def write_table_lines(
if write_headers:
# add separator line after headers
yield write_row(
["-" * column_len for column_len in columns_widths.values()],
["-" * max(3, column_len) for column_len in columns_widths.values()],
columns_widths,
padding,
indent,
Expand Down
2 changes: 1 addition & 1 deletion openapidocs/mk/v3/views_markdown/partial/type.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{%- with props = handler.get_properties(definition) -%}
{% if props %}
| {{texts.name}} | {{texts.type}} |
| -- | -- |
| --- | --- |
{%- for name, schema in props %}
| {{name}} | {% include "partial/schema-repr.html" %} |
{%- endfor -%}
Expand Down
60 changes: 30 additions & 30 deletions tests/res/example1-output-plain.md
Original file line number Diff line number Diff line change
Expand Up @@ -2954,7 +2954,7 @@ _Other possible types: text/json, text/plain_
### Category

| Name | Type |
| -- | -- |
| --- | --- |
| creationTime | string(date-time) |
| description | string | null |
| eTag | string |
Expand All @@ -2968,7 +2968,7 @@ _Other possible types: text/json, text/plain_
### Country

| Name | Type |
| -- | -- |
| --- | --- |
| countryCode | string | null |
| id | string | null |
| name | string |
Expand All @@ -2978,15 +2978,15 @@ _Other possible types: text/json, text/plain_
### CreateOrganizationsBoundInput

| Name | Type |
| -- | -- |
| --- | --- |
| items | Array<[OrganizationBoundInput](#organizationboundinput)> |



### CreateReleaseInput

| Name | Type |
| -- | -- |
| --- | --- |
| categoryId | string |
| countries | Array<string> |
| description | string | null |
Expand All @@ -2997,7 +2997,7 @@ _Other possible types: text/json, text/plain_
### CreateReleaseNodeInput

| Name | Type |
| -- | -- |
| --- | --- |
| fileId | string(uuid) |
| fileName | string |
| fileSize | integer(int32) |
Expand All @@ -3008,15 +3008,15 @@ _Other possible types: text/json, text/plain_
### CreateReleaseOutput

| Name | Type |
| -- | -- |
| --- | --- |
| id | string(uuid) |



### CurrentRelease

| Name | Type |
| -- | -- |
| --- | --- |
| categoryId | string | null |
| countryCode | string | null |
| countryName | string | null |
Expand All @@ -3029,31 +3029,31 @@ _Other possible types: text/json, text/plain_
### DeleteReleaseNodeInput

| Name | Type |
| -- | -- |
| --- | --- |
| id | string(uuid) |



### FileDownloadStats

| Name | Type |
| -- | -- |
| --- | --- |
| uniqueDownloads | integer(int32) |



### FileUrl

| Name | Type |
| -- | -- |
| --- | --- |
| url | string | null |



### GenericError

| Name | Type |
| -- | -- |
| --- | --- |
| code | integer(int32) |
| message | string |

Expand All @@ -3062,7 +3062,7 @@ _Other possible types: text/json, text/plain_
### HealthCheck

| Name | Type |
| -- | -- |
| --- | --- |
| alive | boolean |
| regionName | string | null |
| timestamp | string(date-time) |
Expand All @@ -3072,7 +3072,7 @@ _Other possible types: text/json, text/plain_
### InitializeUploadInput

| Name | Type |
| -- | -- |
| --- | --- |
| fileName | string | null |
| fileSize | integer(int32) |
| fileType | string | null |
Expand All @@ -3083,7 +3083,7 @@ _Other possible types: text/json, text/plain_
### InitializeUploadOutput

| Name | Type |
| -- | -- |
| --- | --- |
| baseURL | string | null |
| fileId | string | null |
| fileName | string | null |
Expand All @@ -3094,7 +3094,7 @@ _Other possible types: text/json, text/plain_
### MetaData

| Name | Type |
| -- | -- |
| --- | --- |
| buildNumber | string | null |
| contactEmail | string | null |
| version | string | null |
Expand All @@ -3104,7 +3104,7 @@ _Other possible types: text/json, text/plain_
### NodeInfo

| Name | Type |
| -- | -- |
| --- | --- |
| creationTime | string(date-time) |
| eTag | string |
| extension | string |
Expand All @@ -3120,7 +3120,7 @@ _Other possible types: text/json, text/plain_
### OrganizationBoundInput

| Name | Type |
| -- | -- |
| --- | --- |
| id | string(uuid) |
| name | string | null |

Expand All @@ -3129,7 +3129,7 @@ _Other possible types: text/json, text/plain_
### ProfessionalContext

| Name | Type |
| -- | -- |
| --- | --- |
| membership | Array<[ProfessionalMembership](#professionalmembership)> |
| signature | string | null |

Expand All @@ -3138,7 +3138,7 @@ _Other possible types: text/json, text/plain_
### ProfessionalMembership

| Name | Type |
| -- | -- |
| --- | --- |
| brandNames | Array<string> |
| categoryId | string | null |
| id | string(uuid) |
Expand All @@ -3156,7 +3156,7 @@ _Other possible types: text/json, text/plain_
### PublishReleaseInput

| Name | Type |
| -- | -- |
| --- | --- |
| eTag | string | null |
| sendEmailNotifications | boolean |

Expand All @@ -3165,7 +3165,7 @@ _Other possible types: text/json, text/plain_
### Release

| Name | Type |
| -- | -- |
| --- | --- |
| category | [Category](#category) |
| categoryId | string | null |
| countries | Array<[ReleaseCountry](#releasecountry)> |
Expand All @@ -3186,7 +3186,7 @@ _Other possible types: text/json, text/plain_
### ReleaseCountry

| Name | Type |
| -- | -- |
| --- | --- |
| country | [Country](#country) |
| countryId | string | null |
| release | [Release](#release) |
Expand All @@ -3197,7 +3197,7 @@ _Other possible types: text/json, text/plain_
### ReleaseHistory

| Name | Type |
| -- | -- |
| --- | --- |
| data | string | null |
| description | string |
| id | string(uuid) |
Expand All @@ -3211,7 +3211,7 @@ _Other possible types: text/json, text/plain_
### ReleaseNode

| Name | Type |
| -- | -- |
| --- | --- |
| id | string(uuid) |
| node | [NodeInfo](#nodeinfo) |
| nodeId | string(uuid) |
Expand All @@ -3223,7 +3223,7 @@ _Other possible types: text/json, text/plain_
### ReleaseNodeDownload

| Name | Type |
| -- | -- |
| --- | --- |
| accessGrantedByOrganizationId | string(uuid) | null |
| id | string(uuid) |
| node | [NodeInfo](#nodeinfo) |
Expand All @@ -3239,7 +3239,7 @@ _Other possible types: text/json, text/plain_
### ReleaseNodeDownloadPaginatedSet

| Name | Type |
| -- | -- |
| --- | --- |
| items | Array<[ReleaseNodeDownload](#releasenodedownload)> |
| total | integer(int64) |

Expand All @@ -3248,7 +3248,7 @@ _Other possible types: text/json, text/plain_
### ReleaseOrganization

| Name | Type |
| -- | -- |
| --- | --- |
| displayName | string | null |
| organizationId | string(uuid) |
| release | [Release](#release) |
Expand All @@ -3259,7 +3259,7 @@ _Other possible types: text/json, text/plain_
### ReleasePaginatedSet

| Name | Type |
| -- | -- |
| --- | --- |
| items | Array<[Release](#release)> |
| total | integer(int64) |

Expand All @@ -3268,7 +3268,7 @@ _Other possible types: text/json, text/plain_
### UpdateReleaseInput

| Name | Type |
| -- | -- |
| --- | --- |
| categoryId | string |
| countries | Array<string> |
| description | string | null |
Expand Down Expand Up @@ -3418,7 +3418,7 @@ This section describes common parameters that are reused across operations.
### PageNumber

| Name | In | Type | Default | Nullable | Description |
| ---- | -- | ---- | ------- | -------- | ----------- |
| ---- | --- | ---- | ------- | -------- | ----------- |


## Security schemes
Expand Down
21 changes: 13 additions & 8 deletions tests/serverfixtures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os
import socket
from multiprocessing import Process
from time import sleep

Expand All @@ -16,18 +16,23 @@ def start_server():
app.run(host="127.0.0.1", port=44777)


def get_sleep_time():
# when starting a server process,
# a longer sleep time is necessary on Windows
if os.name == "nt":
return 1.5
return 0.5
def _wait_for_server(host, port, timeout=10.0):
import time

deadline = time.monotonic() + timeout
while time.monotonic() < deadline:
try:
with socket.create_connection((host, port), timeout=0.1):
return
except OSError:
time.sleep(0.05)
raise RuntimeError(f"Server on {host}:{port} did not start within {timeout}s")


def _start_server_process(target):
server_process = Process(target=target)
server_process.start()
sleep(get_sleep_time())
_wait_for_server("127.0.0.1", SERVER_PORT)

if not server_process.is_alive():
raise TypeError("The server process did not start!")
Expand Down