-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Semantic error is not reported #476
Comments
I'm also having this issue and I would like for this issue to be fixed as we'd like to detect when operationIds are not unique. I tried playing around with the Swagger Editor Docker image and looking through the source code for this Github Action. I'm not super familiar with puppeteer, but it seems that after modifying localstorage with the openapi document, the puppeteer browser does a reload. This seems to be required because the content within the actual text editor will reload the content from localstorage (and is probably the easiest way to insert the text). Afterwards, the validator is then triggered, but it seems that only the structual Here is a minimal document with one structural issue and one semantic error: openapi: 3.0.0
info:
title: Server API
version: 1.0.0
servers:
- url: https://{environment}.test.app/api
variables:
environment:
default: api
enum:
- api
paths:
asdf/admins/users/ban:
post:
summary: Ban a User
description: Ban a User.
operationId: PostAdminsUsersBan
responses:
"200":
description: Successfully banned a user
/admins/users/ban/invalidate:
post:
summary: Invalidate a Ban Record.
description: Invalidate a Ban Records.
operationId: PostAdminsUsersBan
responses:
"200":
description: Invalidation Successful. Once pasted into the Swagger Editor, these two errors appear: Then if I refresh my browser OR if instead of the above, I inserted the document into my local storage and refreshed the browser after that, only this error will show up: It seems that maybe on a page refresh or when loading content from localstorage, it is only validated for structural errors or some other related issue. Wondering if @char0n has any thoughts on this to work around this or if it's a bug that would have to be have to be brought on https://github.com/swagger-api/swagger-editor ? |
+1 |
Well it looks like the error is in upstream SwaggerEditor@4 itself. If we fix it there, it's gonna be automatically fixed here as well. |
Is this issue still unresolved? I am encountering something similar. A broken reference will get reported by the web editor, but not the validation tool. Steps to reproduce:
|
@bm-enverus thanks for additional info. I'll try to look into this ASAP |
Describe the bug
The semantic error reported by SwaggerEditor website is not reported by the Github Action
To Reproduce
Steps to reproduce the behavior:
operationId
Expected behavior
Semantic error at paths./.get.operationId
Operations must have unique operationIds.
Screenshots
N/A
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: