Skip to content

Fixed issue where spec with resource listings were not handled.#21

Open
VShingala wants to merge 2 commits intodevelopfrom
feature/fix-typeerror
Open

Fixed issue where spec with resource listings were not handled.#21
VShingala wants to merge 2 commits intodevelopfrom
feature/fix-typeerror

Conversation

@VShingala
Copy link
Copy Markdown
Member

@VShingala VShingala commented Jan 29, 2024

Overview

This PR fixes conversion from swagger 1.2 definitions that had resource listings in them. Previously, such definitions would throw a TypeError. With this PR we'll handle such definitions in more simpler way by creating a simple GET endpoint for each API path.

We're also introducing support for throwing UserErrors in the case when the issue is with User definitions.

RCA

Swagger v1.2 definitions can have either Resource listing or API Declaration as value of apis field. (Ref). When resource listing are present, till now we tried to read the provided resource which always resulted in TypeError since we're never able to access local files mentioned in definition.

Solution

We're making changes to create very simple collection with GET operation and path instead of providing TypeError. We're also adding support for UserErrors and report errors as such when applicable.

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