You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to parse Azure rest API specs from the official azure-rest-api-specs repo. From a local clone I run those commands:
> pip install "prance[osv,cli]"
> python3
Python 3.11.6 (main, Oct 2 2023, 13:45:54) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
>>> from prance import ResolvingParser
>>> ResolvingParser("/Users/matthias/Documents/Work/someeng/azure-rest-api-specs/specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/virtualNetwork.json")
The first Error I get is this:
prance.util.url.ResolutionError: Recursion reached limit of 1 trying to resolve "file:///Users/matthias/Documents/Work/someeng/azure-rest-api-specs/specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/network.json#/definitions/CloudErrorBody"!
file:///Users/matthias/Documents/Work/someeng/azure-rest-api-specs/specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/network.json#/definitions/CloudError
file:///Users/matthias/Documents/Work/someeng/azure-rest-api-specs/specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/network.json#/definitions/CloudErrorBody
file:///Users/matthias/Documents/Work/someeng/azure-rest-api-specs/specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/network.json#/definitions/CloudErrorBody
Where the definition looks like this (short version):
"CloudErrorBody": {
"properties": {
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudErrorBody"
},
"description": "A list of additional details about the error."
}
}
},
How can I convince prance to read this definition?
If I remove this property manually, I get more complex circular references. Example:
Swagger can read the definition - so it seems valid Swagger 2.0 specs.
Expected Behaviour
prance can read Azure Rest API specs.
Minimal Example Spec
"CloudErrorBody": {
"properties": {
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudErrorBody"
},
"description": "A list of additional details about the error."
}
}
},
I am trying to parse Azure rest API specs from the official azure-rest-api-specs repo. From a local clone I run those commands:
The first Error I get is this:
Where the definition looks like this (short version):
How can I convince prance to read this definition?
If I remove this property manually, I get more complex circular references. Example:
Maybe I need to do something differently.
Swagger can read the definition - so it seems valid Swagger 2.0 specs.
Expected Behaviour
prance
can read Azure Rest API specs.Minimal Example Spec
Actual Behaviour
Throwing an exception.
Steps to Reproduce
git clone https://github.com/Azure/azure-rest-api-specs.git
Environment
The text was updated successfully, but these errors were encountered: