Skip to content

OpenAPI 3.1.0 Documentation Generation#42

Merged
Ge0rg3 merged 18 commits into
Ge0rg3:masterfrom
smt5541:dev/smt5541/openapi
May 28, 2026
Merged

OpenAPI 3.1.0 Documentation Generation#42
Ge0rg3 merged 18 commits into
Ge0rg3:masterfrom
smt5541:dev/smt5541/openapi

Conversation

@smt5541

@smt5541 smt5541 commented Jun 18, 2024

Copy link
Copy Markdown
Collaborator

🛠 Changes being made

Give examples of the changes you've made in this pull request. Include an itemized list if you can.

  • Add OpenAPI 3.1.0 - 3.2.0 Operation object with generation of Parameter and Request Body objects (including their schema properties), and passthrough of provided Responses objects.
  • Add ability to mark routes as deprecated

🧠 Rationale behind the change

Why did you choose to make these changes?

I wanted the API documentation generated by this library to be in a standard format, and OpenAPI is commonly used, with tools like Swagger for displaying it in a convenient and useful way.

Does this pull request resolve any open issues?

#67

Were there any trade-offs you had to consider?

Whether to continue supporting the existing documentation format:

It isn't hurting anything, most of its underlying code is needed to support OpenAPI, and has the benefit of being rendered as HTML by a built-in blueprint and template, so I've chosen to leave it in for now.

Handling JSON Schema of blacklist/whitelist/pattern

Because making a compound regex that properly handles a character blacklist, character whitelist and other custom regex is either impossible or near impossible, the generated OpenAPI Schema will only consider pattern

🧪 Testing

  • Have tests been added or updated for the changes introduced in this pull request?

N/A

  • Are the changes backwards compatible?

If the changes aren't backwards compatible, what other options were explored?

✨ Quality check

  • Are your changes free of any erroneous print statements, debuggers or other leftover code?

  • Has the README been updated to reflect the changes introduced (if applicable)?

💬 Additional comments

Feel free to add any further information below

@smt5541 smt5541 self-assigned this Jun 18, 2024
@smt5541 smt5541 mentioned this pull request Jun 28, 2024
@smt5541 smt5541 force-pushed the dev/smt5541/openapi branch from 61f19e2 to 87d9f4b Compare June 30, 2024 05:00
@smt5541 smt5541 requested a review from Ge0rg3 August 14, 2024 22:50
@smt5541 smt5541 changed the title Draft: OpenAPI 3.1.0 Documentation Generation OpenAPI 3.1.0 Documentation Generation Aug 14, 2024
@smt5541 smt5541 marked this pull request as ready for review August 14, 2024 22:50
@smt5541 smt5541 marked this pull request as draft August 15, 2024 13:35
@smt5541 smt5541 marked this pull request as ready for review August 19, 2024 13:32
Comment thread flask_parameter_validation/docs_blueprint.py
@Ge0rg3

Ge0rg3 commented Aug 4, 2025

Copy link
Copy Markdown
Owner

Hi @smt5541, is this good to resolve/merge?

@smt5541

smt5541 commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator Author

Let me finish #61 and make sure this works with all of the changes from #59 and #61, then I'll @ you :)

@smt5541

smt5541 commented Nov 20, 2025

Copy link
Copy Markdown
Collaborator Author

Now pending implementation of TypedDict support

@smt5541 smt5541 force-pushed the dev/smt5541/openapi branch from 9364edd to fa6d33d Compare May 22, 2026 23:26
@smt5541 smt5541 linked an issue May 22, 2026 that may be closed by this pull request
@smt5541 smt5541 requested a review from Ge0rg3 May 25, 2026 20:20
@Ge0rg3 Ge0rg3 merged commit 6bde29a into Ge0rg3:master May 28, 2026
5 checks passed
@smt5541 smt5541 deleted the dev/smt5541/openapi branch May 28, 2026 15:25
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.

Generating openAPI spec

2 participants