Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoelho93 committed Jun 23, 2024
1 parent 3d49229 commit 7a0dc66
Show file tree
Hide file tree
Showing 9 changed files with 298 additions and 55 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ __pycache__
dist/
coverage.xml
.tox
http_cache.sqlite
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It is usable for a few use cases without major issues.
- [ ] Implement prompt for `array` of `object` property type
- [ ] Implement the `$ref` property type
- [x] Validate string property values with `pattern`
- [ ] Implement prompt for `additionalProperties`
- [ ] Implement object with `additionalProperties`
- [ ] Validate `required` fields
- [x] Implement `number` property type
- [ ] Implement `allOf`, `anyOf`, `oneOf` keywords
Expand Down
40 changes: 20 additions & 20 deletions examples/openapi.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,26 @@
}
},
"definitions": {
"securityRequirement": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"security": {
"type": "array",
"items": {
"$ref": "#/definitions/securityRequirement"
},
"uniqueItems": true
},
"enum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
},
"schemesList": {
"type": "array",
"description": "The transfer protocol of the API.",
Expand Down Expand Up @@ -1101,23 +1121,6 @@
}
}
},
"security": {
"type": "array",
"items": {
"$ref": "#/definitions/securityRequirement"
},
"uniqueItems": true
},
"securityRequirement": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"xml": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -1442,9 +1445,6 @@
"uniqueItems": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
},
"enum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
},
"jsonReference": {
"type": "object",
"required": ["$ref"],
Expand Down
99 changes: 98 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ questionary = "^2.0.1"
jsonpath-ng = "^1.6.1"
pyyaml = "^6.0.1"
requests = "^2.32.3"
requests-cache = "^1.2.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
Expand Down
Loading

0 comments on commit 7a0dc66

Please sign in to comment.