Skip to content
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

Running vaccum in Docker introduces an EOF error. #131

Closed
fratschi opened this issue Sep 27, 2022 · 4 comments
Closed

Running vaccum in Docker introduces an EOF error. #131

fratschi opened this issue Sep 27, 2022 · 4 comments

Comments

@fratschi
Copy link
Contributor

fratschi commented Sep 27, 2022

Hi,

I'm trying to check a yaml file within docker.
Locally, vacuum does not creates this error with the same yaml file.

I searched for the cause of this error in the source-code and in the libopenapi dependency, but i wasn't able to find it.

I would like to fix this, but i need at least a hint what goes wrong or which component is creating the error.

Error:

# Schemas Issues


Line / Column | Severity | Message                                        | Path
(1:1)         | error    | Swagger specification cannot be validated: EOF | $   

Dockerfile

FROM alpine:latest
RUN apk --no-cache add curl && \
    curl -fsSL https://quobix.com/scripts/install_vacuum.sh | sh

COPY ./openapi /tmp/api

WORKDIR /tmp/api/core/
RUN vacuum lint -d test.yaml

test.yaml

openapi: 3.0.3
info:
  version: 1.0.0
  description: test
  title: test
servers:
  - url: 'https://test.de'
tags:
  - name: xxx
    description: xxxx
components:
  schemas:
    Version:
      type: object
      properties:
        version:
          type: string
          description: The version of the service
          example: 2022.06.28.7233
      required:
        - version
paths:
  /core/tenant/v1/version:
    get:
      operationId: version
      tags:
        - xxx
      description: Gets the version of the service
      responses:
        '200':
          description: version of the service
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
@daveshanley
Copy link
Owner

I'll take a look a this today, it feels like an IO error of some kind

@daveshanley
Copy link
Owner

I think this is a bug that I introduced the other day when adding support for OpenAPI 3.1 schemas. The 'Swagger specification' part of the message is the giveaway, it thinks its a swagger spec, not an OpenAPI spec. The patch version of the spec is the culprit I think. I am going to run a couple of tests.

This error persists outside of docker, so it's not a docker issue, I think its a bug from me.

daveshanley added a commit to pb33f/libopenapi that referenced this issue Sep 28, 2022
@daveshanley
Copy link
Owner

This should now be resolved on 0.0.26, it was an oversight on my part in libopenapi.

pb33f/libopenapi@c099e0d

@fratschi
Copy link
Contributor Author

Hi, the version 0.0.26 works and the EOF error is gone.
Thank you so much!

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

No branches or pull requests

2 participants