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

improvement: use struct spec to avoid double % in struct inspect #613

Merged
merged 3 commits into from
Jul 7, 2024

Conversation

zachdaniel
Copy link
Contributor

currently, inspecting an OpenApiSpex.Schema looks like this:

%OpenApiSpex.Schema%{type: :object}

with the new change, it looks like this:

%OpenApiSpex.Schema{type: :object}

which allows copy/pasting the struct

currently, inspecting an `OpenApiSpex.Schema` looks like this:

`%OpenApiSpex.Schema%{type: :object}`

with the new change, it looks like this:

`%OpenApiSpex.Schema{type: :object}`

which allows copy/pasting the struct
@krainboltgreene
Copy link

I hit this the other day, whew.

@zachdaniel
Copy link
Contributor Author

Getting killed a bit on the backwards compatibility here 😆 Do we need to go all the way back to 1.13? If so I'll have to come back to this later when I get a chance and conditionally use the things I'm using or inline the implementation from elixir I'm calling into.

@mbuhot
Copy link
Collaborator

mbuhot commented Jul 7, 2024

@zachdaniel No need to go back that far. I've updated the support matrix to drop < elixir 1.14 and OTP 22.

@mbuhot mbuhot merged commit 5a79def into open-api-spex:master Jul 7, 2024
6 of 14 checks passed
nathanalderson pushed a commit to Tango-Tango/open_api_spex that referenced this pull request Dec 20, 2024
…pen-api-spex#613)

* improvement: use struct spec to avoid double `%` in struct inspect

currently, inspecting an `OpenApiSpex.Schema` looks like this:

`%OpenApiSpex.Schema%{type: :object}`

with the new change, it looks like this:

`%OpenApiSpex.Schema{type: :object}`

which allows copy/pasting the struct
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.

4 participants