Skip to content

Trying to use this to update slack-rs-api, seems broken? #7

Description

@saethlin

I'd like to update the definitions for slack-rs-api, but it looks like it's broken? I'm not a JS dev so I'm quite lost here, can anyone point me in the right direction?

Replacing ... in object fields in response for file_mention
Replacing ... in object fields in response for file_share
Replacing ... in object fields in response for pinned_item
undefined:1



SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /home/ben/slack-api-schemas/api_scraper/index.js:877:56
    at Array.forEach (native)
    at /home/ben/slack-api-schemas/api_scraper/index.js:876:20
    at /home/ben/slack-api-schemas/api_scraper/node_modules/async/lib/async.js:52:16
    at /home/ben/slack-api-schemas/api_scraper/node_modules/async/lib/async.js:361:13
    at /home/ben/slack-api-schemas/api_scraper/node_modules/async/lib/async.js:52:16
    at replenish (/home/ben/slack-api-schemas/api_scraper/node_modules/async/lib/async.js:306:28)
    at /home/ben/slack-api-schemas/api_scraper/node_modules/async/lib/async.js:326:29
    at /home/ben/slack-api-schemas/api_scraper/node_modules/async/lib/async.js:44:16

It looks like the culprit is this line

const messageSchema = GenerateSchema.json(JSON.parse(sanitizeResponse(messageType.name, messageType.sample)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions