Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

SourceMap objects are different between Swagger and API Blueprint #48

@XVincentX

Description

@XVincentX

This is not intrinsically a fury issue, but it's the library where you realise you have this discrepancy.

Fundamentally I realised that, while API Blueprint source maps references are byte based, Swagger source maps' ones are character based.

This is a huge problem in javascript where you're working with UTF-16 strings by default.
It would be a problem with any language anyway, to be more precise - as it is an inconsistency - but - working with UTF8 strings in Javascript is boring.

Worse of all, it turns out the same document written in API Blueprint and then in Swagger (you can take the Polls API as an example) will have a slightly different sourcemaps.

As a workaround, I'm forced to do if (API Blueprint) {} else if (Swagger) {}.
That shouldn't happen and it's not the fury foreword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions