Skip to content

Full OpenAPI links support #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jhassine opened this issue Dec 5, 2024 · 0 comments
Open

Full OpenAPI links support #5

jhassine opened this issue Dec 5, 2024 · 0 comments
Labels
enhancement New feature or request idea Possible idea for improvement
Milestone

Comments

@jhassine
Copy link
Collaborator

jhassine commented Dec 5, 2024

Produce full link support across multiple endpoints: https://swagger.io/docs/specification/v3_0/links/

Currently we have the links defined for the current model (

create_schema_extra = {
"responses": {
201: {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": f"#/components/schemas/{create_response_name}",
},
},
},
"links": {
"UpdateById": {
"operationId": update_operation_id,
"parameters": {"id": "$response.body#/id"},
"description": f"Update {resource_name} by id",
},
"DeleteById": {
"operationId": delete_operation_id,
"parameters": {"id": "$response.body#/id"},
"description": f"Delete {resource_name} by id",
},
"GetById": {
"operationId": get_one_operation_id,
"parameters": {"id": "$response.body#/id"},
"description": f"Get {resource_name} by id",
},
"PatchById": {
"operationId": patch_operation_id,
"parameters": {"id": "$response.body#/id"},
"description": f"Patch {resource_name} by id",
},
},
},
**not_authorized_openapi_extra,
**throttle_openapi_extra,
},
}
) but in addition we could produce the links across different schemas.

Possible so that automatic testing across different API endpoints are possible with e.g.:
https://schemathesis.readthedocs.io/en/stable/stateful.html#why-is-it-useful

@jhassine jhassine added enhancement New feature or request idea Possible idea for improvement labels Dec 5, 2024
@jhassine jhassine added this to the post-v1.0 milestone Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea Possible idea for improvement
Projects
None yet
Development

No branches or pull requests

1 participant