Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-dou committed Feb 4, 2025
1 parent 474ee93 commit ac01720
Show file tree
Hide file tree
Showing 10 changed files with 613 additions and 607 deletions.

Large diffs are not rendered by default.

154 changes: 77 additions & 77 deletions generated/microsoftgraph/microsoft.graph/beta/0.1.10-preview/types.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

148 changes: 74 additions & 74 deletions generated/microsoftgraph/microsoft.graph/v1.0/0.1.10-preview/types.md

Large diffs are not rendered by default.

154 changes: 77 additions & 77 deletions src/swagger-generation/output/microsoftgraph-beta-0.1.10-preview.json

Large diffs are not rendered by default.

148 changes: 74 additions & 74 deletions src/swagger-generation/output/microsoftgraph-v1.0-0.1.10-preview.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/swagger-generation/src/deserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,11 @@ const filterDescription = (description: string, isAlternateKey: boolean): string
return !hasUnhelpfulWord && !hasReadonlyForAlternateKey;
});

return filteredSentences.join('. ').trim();
// Combine all sentences and add a trailing period if not already present
let combinedDescription = filteredSentences.join('. ').trim();
if (combinedDescription && !combinedDescription.endsWith('.')) {
combinedDescription += '.';
}

return combinedDescription
}
4 changes: 2 additions & 2 deletions src/swagger-generation/tests/deserializer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ describe('constructDataStructure', () => {
expect(propertyWithDescription).toBeDefined();
expect(propertyWithNoDescription).toBeDefined();
expect(altenernateKeyWithDescription).toBeDefined();
expect(propertyWithDescription?.Description).toBe('Description of propertyName. Optional');
expect(propertyWithDescription?.Description).toBe('Description of propertyName. Optional.');
expect(propertyWithNoDescription?.Description).toBe('')
expect(altenernateKeyWithDescription?.Description).toBe('Alternate key of the entity. Required');
expect(altenernateKeyWithDescription?.Description).toBe('Alternate key of the entity. Required.');
});

it('should deserialize alternate keys', () => {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit ac01720

Please sign in to comment.