-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix: <binary> is not displaying in the docs #257
fix: <binary> is not displaying in the docs #257
Conversation
src/utils/getApplicableFormats.ts
Outdated
@@ -3,6 +3,12 @@ import { RegularNode, SchemaNodeKind } from '@stoplight/json-schema-tree'; | |||
import { COMMON_JSON_SCHEMA_AND_OAS_FORMATS } from '../consts'; | |||
|
|||
export function getApplicableFormats(schemaNode: RegularNode): [type: SchemaNodeKind, format: string] | null { | |||
// Format is handled for contentMediaType type i.e. binary format | |||
if (schemaNode.types !== null && schemaNode.fragment['contentMediaType'] === 'application/octet-stream') { | |||
for (const type of schemaNode.types) { |
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.
why a loop here if its just going to return?
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.
Hello @daniel-white , I have updated the getApplicableFormat.ts , please review it once.
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.
Per our discussion, @SB-harshitajadhav will put this back in to the way she originally wrote it. Otherwise, it looks great!
🎉 This PR is included in version 4.16.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Motivation and Context
STOP-464
Description
Format is handled for contentMediaType type i.e. binary format
How Has This Been Tested?
Tested in local environment.
Screenshot(s)/recordings(s)
Types of changes
Checklist