diff --git a/config.json b/config.json index a0af38b..5fa811d 100644 --- a/config.json +++ b/config.json @@ -4,5 +4,14 @@ "minimumMastodonVersion": "4.2.0", "blockedFiles": ["methods/notifications_alpha.md"], "overridesRepository": "https://github.com/abraham/documentation", - "overrideCommits": ["b1d8f95b506e2d734876ef47ec0f4e1feb4f5618"] + "overrideCommits": [ + "4590b4302eb9ab4124c7e3670aa8cbe69f03f3e4", + "3b54807103bfa3936029fbb1d17a1fde9f054494", + "0b3f4dfe8e5c404ec83bd22b2ecc52c88e058129", + "b1d8f95b506e2d734876ef47ec0f4e1feb4f5618", + "c6b60e2470226fd7bae1fcfebd4a372775f83419", + "cb223aa9f88db46557ee5722f347055a69e0b3df", + "ed347a1958f584f2a891e15521cffe7aff754a62", + "b7a315c559cb457723c726c1b49f07c35f2bd8a9" + ] } diff --git a/dist/schema.json b/dist/schema.json index 8316266..de4817c 100644 --- a/dist/schema.json +++ b/dist/schema.json @@ -22327,9 +22327,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -23237,9 +23234,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -23346,155 +23340,6 @@ ] } }, - "/api/v1/statuses/{id}/card": { - "get": { - "operationId": "getStatusCard", - "summary": "Fetch preview card", - "description": "Version history:\n\n0.0.0 - added\\\n2.6.0 - deprecated in favor of card property inlined on Status entity\\\n3.0.0 - removed", - "tags": [ - "statuses" - ], - "responses": { - "200": { - "description": "[PreviewCard]", - "headers": { - "X-RateLimit-Limit": { - "description": "Number of requests permitted per time period", - "schema": { - "type": "integer" - } - }, - "X-RateLimit-Remaining": { - "description": "Number of requests you can still make", - "schema": { - "type": "integer" - } - }, - "X-RateLimit-Reset": { - "description": "Timestamp when your rate limit will reset", - "schema": { - "type": "string", - "format": "date-time" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreviewCard" - }, - "examples": { - "PreviewCard200Example": { - "$ref": "#/components/examples/PreviewCard200Example" - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Error401Example": { - "$ref": "#/components/examples/Error401Example" - } - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Error404Example": { - "$ref": "#/components/examples/Error404Example" - } - } - } - } - }, - "410": { - "description": "Gone" - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationError" - }, - "examples": { - "ValidationError422Example": { - "$ref": "#/components/examples/ValidationError422Example" - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Error429Example": { - "$ref": "#/components/examples/Error429Example" - } - } - } - } - }, - "503": { - "description": "Unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Error503Example": { - "$ref": "#/components/examples/Error503Example" - } - } - } - } - } - }, - "externalDocs": { - "url": "https://docs.joinmastodon.org/methods/statuses/#card", - "description": "Official Mastodon API documentation" - }, - "deprecated": true, - "security": [ - { - "OAuth2": [ - "read:statuses" - ] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "description": "id parameter", - "schema": { - "type": "string" - } - } - ] - } - }, "/api/v1/statuses/{id}/context": { "get": { "operationId": "getStatusContext", @@ -23750,9 +23595,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -24467,9 +24309,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -24683,9 +24522,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -25084,9 +24920,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -25324,9 +25157,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -26057,9 +25887,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -26273,9 +26100,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -26489,9 +26313,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -26705,9 +26526,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -26921,9 +26739,6 @@ }, "getSource": { "$ref": "#/components/links/getStatusSourceById" - }, - "getCard": { - "$ref": "#/components/links/getStatusCardById" } } }, @@ -31607,7 +31422,7 @@ ] }, "roles": { - "description": "An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or if the account is remote.", + "description": "An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or null if the account is remote.", "type": [ "array", "null" @@ -31965,7 +31780,7 @@ ] }, "roles": { - "description": "An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or if the account is remote.", + "description": "An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or null if the account is remote.", "type": [ "array", "null" @@ -32182,7 +31997,7 @@ ] }, "roles": { - "description": "An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or if the account is remote.", + "description": "An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or null if the account is remote.", "type": [ "array", "null" @@ -35246,7 +35061,7 @@ "format": "uri" }, "url": { - "description": "The location of the original full-size attachment.", + "description": "The location of the original full-size attachment. Url may be null if the file is still being processed. See [`POST /api/v2/media`]({{< relref \"methods/media\" >}}#v2).", "type": [ "string", "null" @@ -40885,24 +40700,6 @@ } ] }, - "PreviewCard200Example": { - "summary": "Example for PreviewCard", - "value": { - "url": "https://www.youtube.com/watch?v=OMv_EPMED8Y", - "title": "♪ Brand New Friend (Christmas Song!)", - "description": "", - "type": "video", - "author_name": "YOGSCAST Lewis & Simon", - "author_url": "https://www.youtube.com/user/BlueXephos", - "provider_name": "YouTube", - "provider_url": "https://www.youtube.com/", - "html": "", - "width": 480, - "height": 270, - "image": "https://files.mastodon.social/preview_cards/images/014/179/145/original/9cf4b7cf5567b569.jpeg", - "embed_url": "" - } - }, "Context200Example": { "summary": "Example for Context", "value": { @@ -41352,13 +41149,6 @@ "parameters": { "id": "$response.body#/id" } - }, - "getStatusCardById": { - "operationId": "getStatusCard", - "description": "Get the status preview card using the response ID", - "parameters": { - "id": "$response.body#/id" - } } } } diff --git a/src/__tests__/generators/EntityConverter.most-recent-notification-id.test.ts b/src/__tests__/generators/EntityConverter.most-recent-notification-id.test.ts deleted file mode 100644 index 3a10d89..0000000 --- a/src/__tests__/generators/EntityConverter.most-recent-notification-id.test.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { EntityConverter } from '../../generators/EntityConverter'; -import { TypeParser } from '../../generators/TypeParser'; -import { UtilityHelpers } from '../../generators/UtilityHelpers'; -import { EntityClass } from '../../interfaces/EntityClass'; -import { OpenAPISpec } from '../../interfaces/OpenAPISchema'; - -describe('EntityConverter - most_recent_notification_id type', () => { - let entityConverter: EntityConverter; - let utilityHelpers: UtilityHelpers; - let typeParser: TypeParser; - - beforeEach(() => { - utilityHelpers = new UtilityHelpers(); - typeParser = new TypeParser(utilityHelpers); - entityConverter = new EntityConverter(typeParser, utilityHelpers); - }); - - test('should convert most_recent_notification_id as integer type', () => { - const entities: EntityClass[] = [ - { - name: 'NotificationGroup', - description: 'A notification group', - attributes: [ - { - name: 'most_recent_notification_id', - type: 'Integer', // Special case overrides from String to Integer - description: 'ID of the most recent notification in the group.', - optional: false, - nullable: true, - deprecated: false, - enumValues: [], - versions: ['4.3.0'], - }, - ], - }, - ]; - - const spec: OpenAPISpec = { - openapi: '3.1.0', - info: { title: 'Test', version: '1.0.0' }, - paths: {}, - components: { schemas: {} }, - }; - - entityConverter.convertEntities(entities, spec); - - const notificationGroupSchema = spec.components?.schemas?.NotificationGroup; - expect(notificationGroupSchema).toBeDefined(); - if (!notificationGroupSchema) return; - - // Check that most_recent_notification_id is an integer - const mostRecentNotificationIdProperty = - notificationGroupSchema.properties?.most_recent_notification_id; - expect(mostRecentNotificationIdProperty).toBeDefined(); - if (!mostRecentNotificationIdProperty) return; - - // The property should be a nullable integer (type: ["integer", "null"]) - expect(mostRecentNotificationIdProperty.type).toEqual(['integer', 'null']); - expect(mostRecentNotificationIdProperty.description).toBe( - 'ID of the most recent notification in the group.' - ); - }); - - test('should convert most_recent_notification_id as non-nullable integer if not marked nullable', () => { - const entities: EntityClass[] = [ - { - name: 'TestEntity', - description: 'A test entity', - attributes: [ - { - name: 'most_recent_notification_id', - type: 'Integer', - description: 'ID of the most recent notification.', - optional: false, - nullable: false, - deprecated: false, - enumValues: [], - versions: ['1.0.0'], - }, - ], - }, - ]; - - const spec: OpenAPISpec = { - openapi: '3.1.0', - info: { title: 'Test', version: '1.0.0' }, - paths: {}, - components: { schemas: {} }, - }; - - entityConverter.convertEntities(entities, spec); - - const testEntitySchema = spec.components?.schemas?.TestEntity; - expect(testEntitySchema).toBeDefined(); - if (!testEntitySchema) return; - - // Check that most_recent_notification_id is an integer - const mostRecentNotificationIdProperty = - testEntitySchema.properties?.most_recent_notification_id; - expect(mostRecentNotificationIdProperty).toBeDefined(); - if (!mostRecentNotificationIdProperty) return; - - // The property should be a non-nullable integer (type: "integer") - expect(mostRecentNotificationIdProperty.type).toBe('integer'); - expect(mostRecentNotificationIdProperty.description).toBe( - 'ID of the most recent notification.' - ); - }); -}); diff --git a/src/__tests__/parsers/AttributeParser.most-recent-notification-id.test.ts b/src/__tests__/parsers/AttributeParser.most-recent-notification-id.test.ts deleted file mode 100644 index ffbeebc..0000000 --- a/src/__tests__/parsers/AttributeParser.most-recent-notification-id.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { AttributeParser } from '../../parsers/AttributeParser'; - -describe('AttributeParser - most_recent_notification_id special case', () => { - it('should parse most_recent_notification_id as Integer not String', () => { - // Mock content from grouped_notifications.md - const content = ` -#### \`most_recent_notification_id\` - -**Description:** ID of the most recent notification in the group.\\ -**Type:** String\\ -**Version history:**\\ -4.3.0 (\`mastodon\` [API version]({{< relref "entities/Instance#api-versions" >}}) 2) - added -`; - - const attributes = AttributeParser.parseMethodEntityAttributes(content); - - expect(attributes).toHaveLength(1); - const attribute = attributes[0]; - - expect(attribute.name).toBe('most_recent_notification_id'); - expect(attribute.type).toBe('Integer'); - expect(attribute.description).toBe( - 'ID of the most recent notification in the group.' - ); - }); - - it('should parse most_recent_notification_id as Integer in entity format', () => { - // Mock content in entity format (with ### instead of ####) - const content = ` -### \`most_recent_notification_id\` - -**Description:** ID of the most recent notification in the group.\\ -**Type:** String\\ -**Version history:**\\ -4.3.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'NotificationGroup' - ); - - expect(attributes).toHaveLength(1); - const attribute = attributes[0]; - - expect(attribute.name).toBe('most_recent_notification_id'); - expect(attribute.type).toBe('Integer'); - expect(attribute.description).toBe( - 'ID of the most recent notification in the group.' - ); - }); -}); diff --git a/src/__tests__/parsers/AttributeParser.nullable.test.ts b/src/__tests__/parsers/AttributeParser.nullable.test.ts index 312969e..e925ec4 100644 --- a/src/__tests__/parsers/AttributeParser.nullable.test.ts +++ b/src/__tests__/parsers/AttributeParser.nullable.test.ts @@ -550,88 +550,6 @@ describe('AttributeParser - Nullable Patterns', () => { }); describe('Special case exceptions', () => { - it('should mark Account#roles as nullable (entity format)', () => { - const content = ` -### \`roles\` {#roles} - -**Description:** An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or if the account is remote.\\ -**Type:** Array of [AccountRole](#AccountRole)\\ -**Version history:**\\ -4.1.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'Account' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('roles'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe('Array of [AccountRole](#AccountRole)'); - }); - - it('should mark Relationship#languages as nullable (entity format)', () => { - const content = ` -### \`languages\` {#languages} - -**Description:** Which languages are you following from this user?\\ -**Type:** Array of String (ISO 639-1 language two-letter code)\\ -**Version history:**\\ -4.0.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'Relationship' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('languages'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe( - 'Array of String (ISO 639-1 language two-letter code)' - ); - }); - - it('should mark roles field as nullable in method entities', () => { - const content = ` -#### \`roles\` {#roles} - -**Description:** An array of roles assigned to the user that are publicly visible (highlighted roles only), if the account is local. Will be an empty array if no roles are highlighted or if the account is remote.\\ -**Type:** Array of [AccountRole](#AccountRole)\\ -**Version history:**\\ -4.1.0 - added -`; - - const attributes = AttributeParser.parseMethodEntityAttributes(content); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('roles'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe('Array of [AccountRole](#AccountRole)'); - }); - - it('should mark languages field as nullable in method entities', () => { - const content = ` -#### \`languages\` {#languages} - -**Description:** Which languages are you following from this user?\\ -**Type:** Array of String (ISO 639-1 language two-letter code)\\ -**Version history:**\\ -4.0.0 - added -`; - - const attributes = AttributeParser.parseMethodEntityAttributes(content); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('languages'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe( - 'Array of String (ISO 639-1 language two-letter code)' - ); - }); - it('should mark languages as nullable when added in same major version (general backwards compatibility)', () => { const content = ` ### \`languages\` {#languages} @@ -651,153 +569,5 @@ describe('AttributeParser - Nullable Patterns', () => { expect(attributes[0].name).toBe('languages'); expect(attributes[0].type).toBe('Array of String'); }); - - it('should mark MediaAttachment#meta as nullable (entity format)', () => { - const content = ` -### \`meta\` {#meta} - -**Description:** Metadata returned by Paperclip.\\ -**Type:** Hash\\ -**Version history:**\\ -1.5.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'MediaAttachment' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('meta'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe('Hash'); - }); - - it('should mark meta field as nullable in method entities', () => { - const content = ` -#### \`meta\` {#meta} - -**Description:** Metadata returned by Paperclip.\\ -**Type:** Hash\\ -**Version history:**\\ -1.5.0 - added -`; - - const attributes = AttributeParser.parseMethodEntityAttributes(content); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('meta'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe('Hash'); - }); - - it('should NOT mark meta as nullable when not in MediaAttachment entity', () => { - const content = ` -### \`meta\` {#meta} - -**Description:** Some other meta field.\\ -**Type:** Hash\\ -**Version history:**\\ -1.5.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'SomeOtherEntity' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('meta'); - expect(attributes[0].nullable).toBeUndefined(); - expect(attributes[0].type).toBe('Hash'); - }); - - it('should mark MediaAttachment#url as nullable (entity format)', () => { - const content = ` -### \`url\` {#url} - -**Description:** The location of the original full-size attachment.\\ -**Type:** String (URL)\\ -**Version history:**\\ -0.6.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'MediaAttachment' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('url'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe('String (URL)'); - }); - - it('should NOT mark url as nullable when not in MediaAttachment entity', () => { - const content = ` -### \`url\` {#url} - -**Description:** Some other URL field.\\ -**Type:** String (URL)\\ -**Version history:**\\ -0.6.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'SomeOtherEntity' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('url'); - expect(attributes[0].nullable).toBeUndefined(); - expect(attributes[0].type).toBe('String (URL)'); - }); - - it('should mark FeaturedTag#last_status_at as nullable (entity format)', () => { - const content = ` -### \`last_status_at\` {#last_status_at} - -**Description:** The date of the last authored status containing this hashtag.\\ -**Type:** String ([Date](/api/datetime-format#date))\\ -**Version history:**\\ -3.0.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'FeaturedTag' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('last_status_at'); - expect(attributes[0].nullable).toBe(true); - expect(attributes[0].type).toBe( - 'String ([Date](/api/datetime-format#date))' - ); - }); - - it('should NOT mark last_status_at as nullable when not in FeaturedTag entity', () => { - const content = ` -### \`last_status_at\` {#last_status_at} - -**Description:** Some other last_status_at field.\\ -**Type:** String ([Date](/api/datetime-format#date))\\ -**Version history:**\\ -3.0.0 - added -`; - - const attributes = AttributeParser.parseAttributesFromSection( - content, - 'SomeOtherEntity' - ); - - expect(attributes).toHaveLength(1); - expect(attributes[0].name).toBe('last_status_at'); - expect(attributes[0].nullable).toBeUndefined(); - expect(attributes[0].type).toBe( - 'String ([Date](/api/datetime-format#date))' - ); - }); }); }); diff --git a/src/__tests__/parsers/MethodParser.deprecated.test.ts b/src/__tests__/parsers/MethodParser.deprecated.test.ts index 748bb42..bec99a7 100644 --- a/src/__tests__/parsers/MethodParser.deprecated.test.ts +++ b/src/__tests__/parsers/MethodParser.deprecated.test.ts @@ -65,32 +65,6 @@ View information about a profile. expect(result?.deprecated).toBeUndefined(); }); - test('should find deprecated methods in actual statuses file', () => { - const methodFiles = methodParser.parseAllMethods(); - - // Find the statuses file - const statusesFile = methodFiles.find((f) => f.name === 'statuses'); - expect(statusesFile).toBeDefined(); - - if (statusesFile) { - // Look for deprecated methods - const deprecatedMethods = statusesFile.methods.filter( - (method) => method.deprecated === true - ); - - // We should find at least one deprecated method - expect(deprecatedMethods.length).toBeGreaterThan(0); - - // We should specifically find the card method - const cardMethod = deprecatedMethods.find( - (m) => m.endpoint === '/api/v1/statuses/:id/card' - ); - expect(cardMethod).toBeDefined(); - expect(cardMethod?.name).toBe('Fetch preview card'); - expect(cardMethod?.deprecated).toBe(true); - } - }); - test('should generate OpenAPI operations with deprecated flag', () => { const testMethods: import('../../interfaces/ApiMethodsFile').ApiMethodsFile[] = [ diff --git a/src/parsers/AttributeParser.ts b/src/parsers/AttributeParser.ts index 037ff10..bb4e2c3 100644 --- a/src/parsers/AttributeParser.ts +++ b/src/parsers/AttributeParser.ts @@ -107,37 +107,6 @@ export class AttributeParser { attribute.nullable = true; } - // Special case: Account#roles should be nullable - if (entityName === 'Account' && heading.name === 'roles') { - attribute.nullable = true; - } - - // Special case: Relationship#languages should be nullable - if (entityName === 'Relationship' && heading.name === 'languages') { - attribute.nullable = true; - } - - // Special case: MediaAttachment#meta should be nullable - if (entityName === 'MediaAttachment' && heading.name === 'meta') { - attribute.nullable = true; - } - - // Special case: MediaAttachment#url should be nullable - if (entityName === 'MediaAttachment' && heading.name === 'url') { - attribute.nullable = true; - } - - // Special case: FeaturedTag#last_status_at should be nullable - if (entityName === 'FeaturedTag' && heading.name === 'last_status_at') { - attribute.nullable = true; - } - - // Special case: most_recent_notification_id should be Integer not String - // Documentation says String but API actually returns Integer - if (heading.name === 'most_recent_notification_id') { - attribute.type = 'Integer'; - } - // Extract enum values if this is an enumerable type if (cleanedType.toLowerCase().includes('enumerable')) { // Look for enum values in the section content @@ -278,30 +247,6 @@ export class AttributeParser { attribute.nullable = true; } - // Special case: Account#roles should be nullable - // Note: this covers method entities that might reference Account fields - if (name === 'roles') { - attribute.nullable = true; - } - - // Special case: Relationship#languages should be nullable - // Note: this covers method entities that might reference Relationship fields - if (name === 'languages') { - attribute.nullable = true; - } - - // Special case: MediaAttachment#meta should be nullable - // Note: this covers method entities that might reference MediaAttachment fields - if (name === 'meta') { - attribute.nullable = true; - } - - // Special case: most_recent_notification_id should be Integer not String - // Documentation says String but API actually returns Integer - if (name === 'most_recent_notification_id') { - attribute.type = 'Integer'; - } - // Check for enum values in the content between Type and Version history if (enumContent && enumContent.trim()) { const enumValues = EntityParsingUtils.extractEnumValues(enumContent);