Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,10 @@ export const standardLinterfunctions: FunctionItem[] = [

const fields = keys.map((key) => element.get(key)).filter(Boolean);

if (fields.length === 0) {
if (fields.length !== keys.length) {
return true;
}

return !fields.every((field) => {
const elValue = toValue(field);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PropertyToTest'
application/xml:
schema:
$ref: '#/components/schemas/PropertyToTestNoError'
components:
schemas:
PropertyToTest:
Expand All @@ -35,3 +38,19 @@ components:
fieldDate:
type: string
format: date-time
PropertyToTestNoError:
type: object
required:
- id
- fieldname
- fieldDate
properties:
id:
type: string
format: uuid
readOnly: true
fieldname:
type: string
fieldDate:
type: string
format: date-time
4 changes: 2 additions & 2 deletions packages/apidom-ls/test/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5187,11 +5187,11 @@ describe('apidom-ls-validate', function () {
range: {
end: {
character: 10,
line: 27,
line: 30,
},
start: {
character: 8,
line: 27,
line: 30,
},
},
severity: 1,
Expand Down
Loading