Azure / openapi-diff

Command line tool to detect breaking changes between two openapi specifications
MIT License
259 stars 36 forks source link

Upgrade autorest from "--v2" to "--v3" #300

Closed mikeharder closed 6 months ago

mikeharder commented 6 months ago

Currently failing because this command works:

$ npx autorest \
--v2 \
--input-file=src/test/simple/same.json \
--output-artifact=swagger-document.json \
--output-artifact=swagger-document.map \
--output-file=old \
--output-folder=/tmp/oad-test

AutoRest code generation utility [cli version: 3.6.1; node: v20.11.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    | AutoRest core version selected from configuration: ~2.0.4413.

There is a new version of AutoRest available (3.7.1).
> You can install the newer version with with npm install -g autorest@latest

   Loading AutoRest core      '/home/mharder/.autorest/@microsoft.azureautorest-core@2.0.4421/nodemodules/@microsoft.azure/autorest-core/dist' (2.0.4421)

$ ls -al /tmp/oad-test
-rw-rw-r--  1 mharder mharder    95 Mar 13 00:29 old.json
-rw-rw-r--  1 mharder mharder  3182 Mar 13 00:29 old.map

But changing to --v3 produces no output:

$ npx autorest \
--v3 \
--input-file=src/test/simple/same.json \
--output-artifact=swagger-document.json \
--output-artifact=swagger-document.map \
--output-file=old \
--output-folder=/tmp/oad-test

AutoRest code generation utility [cli version: 3.6.1; node: v20.11.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    | AutoRest core version selected from configuration: ^3.2.0.

There is a new version of AutoRest available (3.7.1).
> You can install the newer version with with npm install -g autorest@latest

info    |    Loading AutoRest core      '/home/mharder/.autorest/@autorestcore@3.10.2/nodemodules/@autorest/core/dist' (3.10.2)
info    | Autorest completed in 1.23s. 0 files generated.