-
Notifications
You must be signed in to change notification settings - Fork 74
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
apisprout is rejecting perfecly valid json references #40
Comments
ok, i have the same problem, in the
and in the
then
i dont have any key like and i check the OpenAPI Specification in here and here, i dont think my yaml is invalid. |
I'm having the same issue. I prefer to break up my spec files to make them easier to maintain but APISprout doesn't seem to like refs in the file format like `$ref: ./models/myObject.yaml' but that is perfectly valid as defined here https://swagger.io/docs/specification/using-ref/#syntax |
facing same issue. is there any update to fix this issue?? |
Facing the same issue here. Looking to adopt this for a |
If anyone else is facing this, here's a workaround that I have for now which uses # Install swagger-cli using npm
npm install -g swagger-cli
# Bundle the modular OpenAPI spec into a single, condensed spec file.
swagger-cli bundle ./src/openapi.yaml --outfile ./build/openapi.yaml --type yaml
# Use ApiSprout to run the condensed file.
apisprout ./build/openapi.yaml Using Docker: FROM node:12.18.1 as build
WORKDIR /
COPY src/ /
RUN npm install -g swagger-cli && \
swagger-cli bundle /openapi.yaml --outfile /_build/openapi.yaml --type yaml
FROM danielgtaylor/apisprout
COPY --from=build /_build/openapi.yaml /openapi.yaml |
I have in my main spec document something like this:
And
parts/widget/model.yaml
looks something like this:apisprout rejects this because:
That seems unreasonable. apisprout should not be enforcing restrictions on the organization of documents. These are not schemas because the path includes
#/components/schemas
; they are schemas because they are included by reference in theschemas
section of the specification.The text was updated successfully, but these errors were encountered: