-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add spectral rules #20 #229
Add spectral rules #20 #229
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다! 이 커스텀 룰셋을 로컬에서 테스트해 보려면 각 규칙별로 어떻게 해야 하는지를 PR 본문에 적어주시면 좋겠습니다.
73d2532
to
9a6f853
Compare
related to aliencube#20, aliencube#21 필수 필드를 지정하고, 해당 필드가 없을 경우 에러를 발생시키도록 수정
- response 하위 responsecode들은 content를 포함 - 다만, 401 코드는 content를 포함하지 않아도 되게끔 수정
8aac8e2
to
0e9edfd
Compare
- path parameters 커스텀 검사규칙 삭제 - 내장된 spectral(path-params)를 대신 사용함
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
몇가지 불필요한 규칙만 삭제하면 될 듯 싶습니다.
불필요한 규칙 삭제 - Post RequesstBody는 암시적으로 생성됨, 규칙제거 - Get Parameters는 spectral 내장규칙사용, 불필요 각주제거 - responsecode별 description은 암시적으로 생성됨, 규칙제거
Test ResultsTests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @tae0y 수고하셨습니다!
related to #20, #21, #221
필수 필드를 지정하고, 해당 필드가 없을 경우 에러를 발생시키도록 수정
spectral openapi 기본 룰셋을 확장해서
현재 기준으로
weatherforecast
,chat/completions
에 지정된 필드들을 필수값으로 지정해서없을 경우에는 error를 발생시키도록 해보았습니다~
(세부내용은
.spectral.yaml
각주에 기재해두었습니다!)ruleset 테스트코드
ruleset 테스트방법