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

feat: Upgrading Openapi to 3.1 spec #15

Closed
wants to merge 8 commits into from

Conversation

nicolasauler
Copy link

Hello there,

I was having to parse a 3.1 json and noticed that some of the structures hadn't been updated yet.
The documents I used were:

Aside from that, I also removed the .vscode folder, rustfmt.toml and watch.sh, as suggestions.
The vscode folder I reckon could maybe be put in the gitignore.
The rustfmt one is all commented, but I don't know if it needs to be there for some CI flow.
And the watch.sh, could also be added to gitignore.
But then again, it's just a suggestion to make it more simple for contributions, but I really appreciate the effort in making it easier for people to run cargo watch or setup their environments.

ps.1: I'm not an experienced open-source contributor, so feel free to ask for as many changes as you want ☺️
ps.2: Thanks for the project, it's been really useful!

Copy link
Member

@robjtede robjtede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this effort aligning with the 3.1 spec

can you try to describe all the item changes in the changelog please

#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Default)]
#[serde(rename_all = "camelCase")]
pub enum ParamLoc {
#[default]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good change

but.... why is query the default? the spec doesn't seem to define this

pub struct Parameter {
/// The name of the parameter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this doc?


#[serde(rename = "contentMediaType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_media_type: Option<String>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of this property MUST be a string, which MUST be a media type

might be worth making this a mime::Mime

@robjtede
Copy link
Member

Some efforts have been made to better align with v3.1. As such this PR is outdated, feel free to re-open with a new base on master.

@robjtede robjtede closed this Jun 30, 2024
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.

2 participants