Skip to content

Commit

Permalink
Wrap custom_openapi in a lambda function (#448)
Browse files Browse the repository at this point in the history
Wrap custom_openapi in a lambda function

This is done, since the `self.openapi()` call internally in the FastAPI
class will not support being replaced by a function with named
parameters.
  • Loading branch information
CasperWA authored and TEAM4-0 committed May 23, 2024
1 parent 8476722 commit 0f5e1e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

**Fixed bugs:**

- OpenAPI is not retrievable [\#447](https://github.com/EMMC-ASBL/oteapi-services/issues/447)
- Docker compose failing in CI test workflows [\#370](https://github.com/EMMC-ASBL/oteapi-services/issues/370)

**Closed issues:**
Expand All @@ -23,7 +24,7 @@

**Merged pull requests:**

- \[Auto-generated\] Update dependencies [\#445](https://github.com/EMMC-ASBL/oteapi-services/pull/445) ([TEAM4-0](https://github.com/TEAM4-0))
- Wrap custom\_openapi in a lambda function [\#448](https://github.com/EMMC-ASBL/oteapi-services/pull/448) ([CasperWA](https://github.com/CasperWA))
- \[Auto-generated\] Update dependencies [\#429](https://github.com/EMMC-ASBL/oteapi-services/pull/429) ([TEAM4-0](https://github.com/TEAM4-0))

## [v1.20230324.302](https://github.com/EMMC-ASBL/oteapi-services/tree/v1.20230324.302) (2023-03-24)
Expand Down
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
The server should be deployed via the `Dockerfile`.
"""

__version__ = "1.20240522.362"
__version__ = "1.20240523.363"
__author__ = "SINTEF"
__author_email__ = "Team4.0@SINTEF.no"
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def create_app() -> FastAPI:
)

# Customize the OpenAPI specficiation generation
app.openapi = custom_openapi
app.openapi = lambda: custom_openapi(app)

return app

Expand Down

0 comments on commit 0f5e1e8

Please sign in to comment.