Skip to content
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

Support deprecating records #1052

Open
bmeesters opened this issue Jul 7, 2022 · 3 comments
Open

Support deprecating records #1052

bmeesters opened this issue Jul 7, 2022 · 3 comments

Comments

@bmeesters
Copy link
Contributor

OpenAPI supports the possibility to deprecate a record by simply adding a field:

            "transportEquipment": {
                "deprecated": true,
                "example": {
                    "description": "Europallet with boxes of bananas",
                    "quantity": 3,
                    "loadMeters": {
                        "value": 3,
                        "unit": "m"
                    }
                },

As far as I know this is currently not possible in endpoints4s. It would be great if we add a method deprecateRecord to the JsonSchemas algebra. This method would simply return the same record in the json interpreters, but would tag the record in the OpenAPI interpreter as deprecated.

@bmeesters
Copy link
Contributor Author

I would also like to deprecate variants of oneOf:

image

You can get this behavior by marking the type deprecated (which is not completely the same thing, but closest to what I would like to see)

@bmeesters
Copy link
Contributor Author

Hey @julienrf, I see you gave a thumpsup. So, I can make a PR and you can make some time for the review (not in a hurry though, so if the timing is bad it can wait for a bit)?

@julienrf
Copy link
Member

Yes, feel free to go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants