Skip to content

Commit

Permalink
CodeGen from PR 14871 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Maps] Add separate Swagger definitions for Maps client libraries (Azure#14871)

* Make maps data-plane swagger files compile when taken from api to sdk.

* Update correctly the search api

* Update common.js and add swagger codegen to maps dataplane.

* Fix path issue

* fix prettifier error.

* Replace mistyped extension.

* Fix common type version.

* Fix errors for alias.json

* run prettier

* fix security def and parameters.

* Revert "fix security def and parameters."

This reverts commit 85370d9b6b3ad0ae615d1931aa7a5eec39957b30.

* Revert "run prettier"

This reverts commit be16d4423be319cc4b7a957abe977aced26e0fa5.

* Revert "Fix errors for alias.json"

This reverts commit 0458cbc9489ba8cc05a575517b35001fa4c4a7e8.

* fix extension issue

* comment out all other errors.

* revert changes to package.json files

* update files. remove common response as it isn't supported.

* update readonly problem

* Update error correctly to not be a breaking change

* Remove unused definition.

* Fix GeoJSONGeometryCollection

* Fix naming scheme

* fix coord abb

* fix geometryCollection error by using a more generic type for inheritance.

* update anon def

* try without schema

* fix naming issue.

* add schema

* try again

* update common file

* update route.json file

* Revert "update route.json file"

This reverts commit 2858248ea19ece1998617afbb83c1b6633487834.

* Update geometry collection.

* fix go modeler error

* remove type

* - fix ModelValidation

* - enable Java and Python generation

* try with new errorDetail.

* correct paths

* revert changes to odataerror. update python sdk.

* fix typo

* update error and readonly CoordinateAbbreviated to reuse more.

* - try to build Python SDK

* - try to forcefully build Python SDK

* Add top level java.

* update warnings from lint diff

* try java generation with the inline file.

* update Java compilation with right tags.

* Fix compilation warnings

* Update readme namespace names

* Make enums be modelAsString: true

* Add x-ms-error-response to error responses

* Remove feedback.json and feedback reference from readme.md.

* Fix "security" requirement object to have valid scope for OAuth2 security scheme type

* Fix "security" requirement object to have valid scope for OAuth2 security scheme type - add missing file

* Use common client parameters - part 1

* Use common client parameters - part 2

* Fix lint errors

* update go namespace to the correct one.

* Use common response objects to fix duplicate schemas

* Fix semantic & model validation

W/A for OAV as it is not able to parse Swagger file without "responses" object.

* Fix autorest duplicate schema warnings

Use common schema for Language, View, xTileIndex & yTileIndex between Render 1.0, Render 2.0, Search 1.0 and Traffic 1.0.

* Fix C# generation of StyleRuleBaseType enum type

* Fix license header for GO lang

* Fix inheritance of the StyleRuleBase type in the FeatureState API

* Revert resource-manager changes.

* Remove current version.

* Update java namespace.

* Fix StyleRuleBase type inherited types generation

* Fix prettier error

* Use common GeoJson naming & fix inheritance

* Update 200 response to be 200Async instead of error response. Also update the examples for the given routes.

* Fix StyleRuleBase type inherited types generation

* Fix 'avoid' parameter in Route service to be actually an array of things to avoid

* Rename definitions to have at least two words (fix AZC0012 error) and add missing x-ms-enums.

* Fix prettier

* Fix GeoJSON type hierarchy and WFS examples

* Fix long running operation definitions and examples

* Add missing descriptions

* Define batch responses in more detail & remove redundant definitions in Search API

* Alias - remove unused definitions and empty 204 response

* Data - remove unused definitions, empty 204 responses and file upload parameters

* Dataset - remove unused definitions and empty 204 response

* Fix description and linter validation

* Elevation - remove unused definitions, merge some of them to get less models

* Conversion, Feature State & Geolocation - remove unused definitions and empty 204 response

* Use previous package-1.0-preview until new package-preview-2.0 is fixed.

* Fix merge conflicts after rebase and security LintDiff

* Fix Alias, Data, Dataset, Conversion, Feature State, Tileset & WFS 2.0 services

* Fix linter warnings - Use common definition for ontology

* Fix linter errors - LongRunningResponseStatusCode

* Fix ApiDocPreview

* Use different tag format to not relate with API version used

* Use dummy trick to make ApiDocPreview and Avocado work

* Another approach for ApiDocPreview

* Seems like it is impossible to make ApiDocPreview work until someone takes a look at "REST API CI Script Reporter" in the "OpenAPIPortal-REST-Generator" pipeline and fix it to use referenced Swagger files.

* update featureid to local parameter in wfs to see if it fixes error.

* Remove dataset from wfs as it is not needed to fix doc preview.

* Remove part that should be auto generated.

* Fix error with java codegen.

* Try to only export new versions of api.

* Readd removed api's. Try with wfs v1 to see if api-preview passes.

* remove wfs2

* Re-add wfs

* update the readme.go to see if it generates install instructions.

* add after scripts to bundle install

* Remove defaults from route to test if it fixes go sdk problems.

* Remove "x-publish" just for api doc preview test

* fix JSON typo after removal

* Experiment: do not use common responses for WFS 2.0

* Remove required false as it is the default value for query parameters. Remove default value for non required values.

* run prettier.

* Add onbe error-response individually to see if it fixes alias error.

* Revert experimental WFS changes

* Remove unused error.

* Remove duplicated common file for 2.0

* Use ResponseFormat as a name for JsonFormat as one of the values is Json

* Mobility & Render - fix response types, remove unnecessary definitions

* Revert renaming TransitRouteType

* revert data.json to consume the correct type

* Only put at consumes application/json

* Update consumes for data.

* Render - rename operations to have common names with examples

* update python codegen to use track2 correctly

* Also change track2 from readme.md

* Add track2 and track1

* Don't generate the sdk for arm.

* Remove python track1 and add net track2.

* Search - reduce number of responses for common cases

* Elevation - fix input param for GetDataForPolyLine

* Spatial - remove duplicated & unused definitions

* Data - fix model validation

* Tileset - remove 204 body

Add x-ms-pageable to where it suits

* Timezone & Traffic - fix "produces" fields and Traffic file responses

* Add azure-sdk-for-net-track2 references to the -pr repo

* Use azure-sdk-for-net without track2 since it's not enabled in the CI yet.

* Weather - remove unused definitions

* WFS 1.0 - remove unused definition and standardize naming

* WFS 2.0 - remove unused definition and standardize naming

* Put TextFormat & GeographicResourceLocation to a common file

* Fix double to integer so that calls work.

* Skip url encoding for elevation input parameters.

* Put url ecoding to correct spot.

* update geoemtries to be comma separated array.

* Change search parameter order so that textFormat is always first.

* Change parameter to udid from udId to be consistent

* update wfs limit from float to int

* update from string to datetime

* Refix elevation.

* Fix elevation prettier.

* correctly update parameter to udid.

* Add geography to all services.

* update date-time

* Add description to data

* Add client flatten

* Run prettier

* Add geometry to examples.

* Update missing routes.

* Route - fix added endpoints for missing API

* Use autorest v3 for TypeScript code gen

* Add arm to python sdk in order to have aad auth.

* Run prettier on route.

* update get routes fixes.

* put correct name for example.

* update format

* Add missing responses

* Add same security for all.

* fix copyright and countryCode warnings

* remove arm.

* fix extra comma

* Add long running

* Remove unused stuff from readme.md

* Run prettifier

* see if x-publish fixes linter error.

* Replace description.

* disable long running operation for put state update

* Add schema of type string.

* Replace description

* Remove schema.

* Remove after install to see if go package still fails.

* Change credential type to bearer. and remove each sub key param.

* - remove XML since our client libs are using JSON only and TS codegen cannot parse responses properly

* - fix DWG conversion 200 response to not be an error but actual result with operationId in the body

- use 6.0.0-alpha.20210514.1 TS codegen as latest beta has broken LRO support for JS core v1 (cannot use core v2 due to missing API key credential)

* Fix Data & Dataset conversion 200 response to not be an error but actual result with operationId in the body

* Fix OAuth description for Lint diff & fix prettier

* Another try for the LintDiff CI

* Yet another try for the LintDiff CI

* Remove security from common

* fix description message.

* Remove preview 1 since preview 2 is added.

* remove unused preview 1 files.

* Change api version from common to each service.

* Add default error.

* Update version and route and search with batch. Remove subscription key from examples.

* fixes.

* Re-add 408.

* fixes to errors.

* update types.

* Update description for batch.

* remove unused errors from examples.

* fix ci after changes.

* fix again errors in examples.

* remove package-preview-1.0 from go.

* Remove go codegen as track1 isn't supported for data-plane.

* Leave go readme. Remove js from ci for now.

* remove 200 from dataset.

* Put 200 response back to the Maps LROs. Although those paths do not return 200 directly (202 instead) the TS codegen takes 200 definition for the response type, so it is needed to deserialize.

* Try to use .NET Track 2

* Workaround TS autogen limitation - loses inherited class properties due to invalid deserialization of base class properties only

* Fix 200 to be 400 error(fix duplicate)

* change versioning.

* commit unsaved files.

* fix wrong version.

* fix breaking change.

* Fix LintDiff errors and azure-sdk-for-net build

* fix cSpell

* Fix common descriptions for other Swaggers after e0624d2b17a8dcee07acfb08f39508a773a8dc21

* Use the new Azure AD description

* Add back API key description

* update consumes in data

* fix typo.

* update creator.

* update references

* update spatial version to 2.

* fix data upload.

* move spatial back to 1.0 for now and update batch to have 200 in case of success.

* Remove mobility as its deprecated.

* move spatial samples.

* Update config md files & fix minor versioning issues

* Remove unnecessary "produces" and "202Batch"

* Use autorest's predefined AADToken & AzureKey

* Generate public clients for C#

* Prettier fix

* change go namespaces

* golang track2 config updates

* Use latest TypeScript generator with core v2

* Fix Swagger ModelValidation

Co-authored-by: Dragos Daian <v-ddaian@microsoft.com>
Co-authored-by: ambientlight <primary.taras.vozniuk@gmail.com>
  • Loading branch information
3 people committed Jul 20, 2021
1 parent 2e7e608 commit ff81438
Show file tree
Hide file tree
Showing 25 changed files with 3,428 additions and 0 deletions.
71 changes: 71 additions & 0 deletions sdk/maps/Azure.Maps.Timezone/src/Generated/ITimezoneClient.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

248 changes: 248 additions & 0 deletions sdk/maps/Azure.Maps.Timezone/src/Generated/ITimezoneOperations.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions sdk/maps/Azure.Maps.Timezone/src/Generated/Models/CountryRecord.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff81438

Please sign in to comment.