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 indexmap 2.0.0 #76

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
check-style:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Report cargo version
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-18.04, windows-2019, macos-10.15 ]
os: [ ubuntu-22.04, windows-2022, macos-12 ]
steps:
- uses: actions/checkout@v2
- name: Build
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openapiv3"
version = "1.0.2"
version = "1.0.3"
authors = ["Glade Miller <[email protected]>"]
edition = "2018"
license = "MIT/Apache-2.0"
Expand All @@ -12,11 +12,11 @@ description = "This crate provides data structures that represent the OpenAPI v3
[dependencies]
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
indexmap = {version = "1.0", features = ["serde-1"]}
indexmap = {version = ">=1.6.1, <3.0.0", features = ["serde"]}

[dev-dependencies]
newline-converter = "0.2.0"
serde_yaml = "0.8"
newline-converter = "0.3.0"
serde_yaml = "0.9"

[features]
skip_serializing_defaults = []
53 changes: 26 additions & 27 deletions fixtures/petstore-discriminated.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
openapi: 3.0.0
info:
title: Swagger Petstore
Expand All @@ -7,39 +6,39 @@ info:
version: 1.0.0
x-hash: abc123
servers:
- url: "http://petstore.swagger.io/v1"
- url: http://petstore.swagger.io/v1
paths: {}
components:
schemas:
Cat:
description: A representation of a cat
allOf:
- $ref: "#/components/schemas/Pet"
- type: object
properties:
huntingSkill:
description: The measured skill for hunting
type: string
enum:
- clueless
- lazy
- adventurous
- aggressive
required:
- huntingSkill
- $ref: '#/components/schemas/Pet'
- type: object
properties:
huntingSkill:
description: The measured skill for hunting
type: string
enum:
- clueless
- lazy
- adventurous
- aggressive
required:
- huntingSkill
Dog:
description: A representation of a dog
allOf:
- $ref: "#/components/schemas/Pet"
- type: object
properties:
packSize:
description: the size of the pack the dog is from
type: integer
format: int32
minimum: 0
required:
- packSize
- $ref: '#/components/schemas/Pet'
- type: object
properties:
packSize:
description: the size of the pack the dog is from
type: integer
format: int32
minimum: 0
required:
- packSize
Pet:
discriminator:
propertyName: petType
Expand All @@ -50,5 +49,5 @@ components:
petType:
type: string
required:
- name
- petType
- name
- petType