Skip to content

Added test file for swagger2.0 and fixed type #53

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hbina
Copy link

@hbina hbina commented Jan 23, 2021

  1. Also boxed the variants because they are extremely large....I don't want this on the stack.

Signed-off-by: Hanif Bin Ariffin [email protected]

#[serde(skip_serializing_if = "Option::is_none")]
pub responses: Option<BTreeMap<String, Response>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub security_definitions: Option<BTreeMap<String, Security>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub security: Option<Vec<BTreeMap<String, Vec<String>>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub external_docs: Option<Vec<ExternalDoc>>,
pub external_docs: Option<ExternalDoc>,
Copy link
Author

Choose a reason for hiding this comment

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

The only fix that is relevant to match the spec.

Choose a reason for hiding this comment

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

If so, how come e.g. title is no longer optional?

@bergmark
Copy link

I'm not sure if this library aims for roundtripping of documents, but it would be great to have a test for roundtripping here. e.g. deserialize to serde_json::Value (a), then to openapi, serialize to serde_json::Value (b), and then compare (a) and (b).

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