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've gotten to the point where everything is working but I just realized that some of the Aliases and Anchors defined on the Spec File aren't being recognized downstream on the Client. For example, the /recareas endpoint returns a dict with two keys, "RECDATA" and "METADATA". Their Swagger Docs confirm this too: https://ridb.recreation.gov/docs/#/Recreation%20Areas/getRecAreas. But when I feed their spec file into swagger-codegen the corresponding API Client only has the "RECDATA" key and is missing "METADATA" since it uses a YAML Alias in the spec file.
Not knowing a whole lot about Swagger I'm a little lost here. Is there a way to get swagger-codegen to recognizes these anchors/aliases? Is their spec file just a weird, proprietary version? I've been using the swagger-codegen-cli-v3 Docker image to generate the client.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been working to automate a Python Client built of the Recreation Information Database, hosted by Recreation.gov: https://ridb.recreation.gov/docs/. The project is hosted on this repo: https://github.com/juftin/recdotgov-client
I've gotten to the point where everything is working but I just realized that some of the Aliases and Anchors defined on the Spec File aren't being recognized downstream on the Client. For example, the
/recareas
endpoint returns a dict with two keys, "RECDATA" and "METADATA". Their Swagger Docs confirm this too: https://ridb.recreation.gov/docs/#/Recreation%20Areas/getRecAreas. But when I feed their spec file into swagger-codegen the corresponding API Client only has the "RECDATA" key and is missing "METADATA" since it uses a YAML Alias in the spec file.Here's the Spec File in question: https://github.com/juftin/recdotgov-client/blob/947460ed56776195c8af00d79cd054f5f8c4651e/openapi.yaml#L1276-L1288
And here's the Python generated code: https://github.com/juftin/recdotgov-client/blob/947460ed56776195c8af00d79cd054f5f8c4651e/recdotgov_client/models/inline_response2001.py#L19
Not knowing a whole lot about Swagger I'm a little lost here. Is there a way to get swagger-codegen to recognizes these anchors/aliases? Is their spec file just a weird, proprietary version? I've been using the swagger-codegen-cli-v3 Docker image to generate the client.
Beta Was this translation helpful? Give feedback.
All reactions