Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

JSON representation of http.Server.listen #3920

Closed
AndreasMadsen opened this Issue Aug 25, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Member

AndreasMadsen commented Aug 25, 2012

I have been digging in the JSON documentation lately and have found that some methods have the wrong signatures object:

        methods: 
          [ { name: 'listen',
              type: 'method',
              signatures: 
               [ { params: 
                    [ { name: 'port' },
                      { name: 'hostname', optional: true },
                      { name: 'backlog', optional: true },
                      { name: 'callback', optional: true } ] } ] },
            { name: 'listen',
              type: 'method',
              signatures: 
               [ { params: 
                    [ { name: 'path' },
                      { name: 'callback', optional: true } ] } ] },
            { name: 'listen',
              type: 'method',
              signatures: 
               [ { params: 
                    [ { textRaw: '`handle` {Object} ',
                        name: 'handle',
                        type: 'Object' },
                      { textRaw: '`listeningListener` {Function} ',
                        name: 'listeningListener',
                        type: 'Function',
                        optional: true } ] },
                 { params: 
                    [ { name: 'handle' },
                      { name: 'listeningListener',
                        optional: true } ] } ] },
            { name: 'close',
              type: 'method',
              signatures: [ { params: [ { name: 'cb', optional: true } ] } ] } ] },

Either there should be only one listen or signatures should only have one params object.

This is a side effect of how the documentation JSON is generated; since the listen method is listed three times in the markdown with three separate signatures, it appears in the JSON version three times.

Owner

jasnell commented May 18, 2015

@chrisdickinson ... is there anything to actually do on this one?

Owner

jasnell commented May 20, 2015

while definite improvements could be made to the json serialization of the docs, this does not appear to be a significant issue. Closing. Can reopen if we feel it's necessary or new information is received.

@jasnell jasnell closed this May 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment