Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ivan Goncharov
    @IvanGoncharov
    in many cases they have similar ending
    that is heuristic that is used right now
    I solve this by using path from resourceListing as key for resource itself
    Mohsen Azimi
    @mohsen1
    Hmm... so per specs there is no guarantee that you get right basePath from JSON content. Right?
    Ivan Goncharov
    @IvanGoncharov
    you can get basePath for calling APIs
    but if you want to find out path to resource from resource content
    it because tricky
    in theory it should be solved by resourcePath
    problem is that it optional field
    Mohsen Azimi
    @mohsen1
    oh if it's optional we can't rely on that
    Ivan Goncharov
    @IvanGoncharov
    and even if it present
    in many cases it have incorrect values
    actually in most of the cases
    Mohsen Azimi
    @mohsen1
    I see.
    Ivan Goncharov
    @IvanGoncharov
    so what I'm trying to do
    Mohsen Azimi
    @mohsen1
    Ok, I'm convinced this API change is a good move
    but it should be done very carefully
    A lot of people are using this tool https://www.npmjs.com/package/swagger-converter
    first of all it should be part of a major release
    Ivan Goncharov
    @IvanGoncharov
    That is why I want to do this in 1.0.0
    Mohsen Azimi
    @mohsen1
    We should also throw proper errors if people are passing arguments based on previous API syntax
    Ivan Goncharov
    @IvanGoncharov
    Ok
    Mohsen Azimi
    @mohsen1
    Awesome!
    Ivan Goncharov
    @IvanGoncharov
    and if you want to use it in swagger-converter
    CLI syntax should be changed
    Mohsen Azimi
    @mohsen1
    in swagger-tools you meant, right?
    ok, those are steps after we release 1.0
    Ivan Goncharov
    @IvanGoncharov
    yes, swagger-tools
    Mohsen Azimi
    @mohsen1
    swagger-tools is kind of being replaced by sway and swagger command line tool (npm i -g swagger)
    Ivan Goncharov
    @IvanGoncharov
    convert [options] <resourceListing> <apiDeclarations...>
    Converts Swagger 1.2 documents to a Swagger 2.0 document
    Mohsen Azimi
    @mohsen1
    but I'll take care of those after the fact
    Ivan Goncharov
    @IvanGoncharov
    ok
    Mohsen Azimi
    @mohsen1
    We should release 1.0 and wait a couple of weeks to fix bugs that usually pop up after releases
    Jose Galisteo
    @ceritium
    Hi! I'm trying to convert a swagger 1.2 to swagger 2.0 with swagger-tools (CLI)
    the problem is that the 1.2 spec has a undocumented param attribute
    any suggestion?
    @ceritium
    would be interesting a pull request that accept custom attributes for params like 2.0
    x-whatever
    ?
    Nuba Princigalli
    @nuba

    Hello folks, I'm getting

    $ api-spec-converter  http://0.0.0.0:3000/explorer/resources --from swagger_1 --to swagger_2  > api-converted.json
    [Error: Exception during convertion: SwaggerConverterError: Second argument(apiDeclarations) should be plain object, see release notes.]

    when running api-spec-converter in a machine but then it's running flawless in another. how should I go about debugging this?

    Ivan Goncharov
    @IvanGoncharov
    First try
    npm update
    on both machines
    Also check node versions: node --version
    Ivan Goncharov
    @IvanGoncharov
    If updating packages didn't help, please open issue in api-spec-converter
    and attach spec that you trying to convert
    Nuba Princigalli
    @nuba
    @IvanGoncharov thank you
    Nuba Princigalli
    @nuba
    @IvanGoncharov ended up moving to a swagger 2.x api spec, so the conversion step became unnecessary. Thanks anyway!
    Mohsen Azimi
    @mohsen1
    Hey @IvanGoncharov I was out of loop for this. Are we doing version 1.0?
    Ivan Goncharov
    @IvanGoncharov
    HI
    yes it mostly documentation changes
    change examples and update README