Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Code architecture refactoring and fixing project structure #612

Merged
merged 12 commits into from
Feb 15, 2022
Merged

Code architecture refactoring and fixing project structure #612

merged 12 commits into from
Feb 15, 2022

Conversation

DeagleGross
Copy link
Collaborator

@DeagleGross DeagleGross commented Feb 11, 2022

Things I have done in this PR:

  • fix the folder structure in the project, rename solution and set proper naming for projects (from apimtemplate to Microsoft.Azure.Management.ApiManagement.ARMTemplates). Now all source code is in src\ARMTemplates\ project, all tests are in tests\ARMTemplates.Tests project. Fixed documentation with links to projects.
  • move all used configuration and resource files by test project to tests\ARMTemplates.Tests\Resources, so that there is no dependency for the src. Fixed tests.
  • refactored Extractor option of console application: now there is an ExtractorExecutor, that gets the ExecutorConfig instance (parameters for launch) + has all the extractors as interfaces. That change leads to possibility of testing Extractor correctly with Mocks.
  • Added Logger class, so there is no dependency to any specific logging possibility. This will be useful once this library stops being just a console application.
  • Other usefull fixes and modifications (like adding Rider files to .gitignore and fixing pipeline csproj regex)

So plan of fixing this repo is in this state after merging the PR:

  • Issue 614 rename master to main
  • Issue 616 fix the project folder structure
  • Issue 615 provide editor config
  • Issue 617 create specific types for API requests\responses + fix property naming

Relates to https://github.com/Azure/azure-api-management-devops-resource-kit/issues/607,
Relates to #616

@DeagleGross DeagleGross self-assigned this Feb 11, 2022
Copy link
Member

@tomkerkhove tomkerkhove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a first sweep, I think fixing the repo structure & namespaces is one of the biggest things we should improve/revert

@DeagleGross DeagleGross changed the title Overall refactoring Extractor architecture code refactoring Feb 14, 2022
@DeagleGross DeagleGross changed the title Extractor architecture code refactoring Code architecture refactoring and fixing project structure Feb 14, 2022
@DeagleGross DeagleGross requested a review from Hardell February 15, 2022 12:40
Copy link
Member

@tomkerkhove tomkerkhove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving since Milan had a re-review

@tomkerkhove tomkerkhove merged commit 1f8e00e into Azure:main Feb 15, 2022
@DeagleGross DeagleGross deleted the dmkorolev/607_refactoring branch February 16, 2022 10:30
DeagleGross added a commit that referenced this pull request Feb 18, 2022
Hardell pushed a commit that referenced this pull request Feb 18, 2022
Hardell pushed a commit that referenced this pull request Mar 18, 2022
Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>
DeagleGross added a commit that referenced this pull request Mar 21, 2022
* Code architecture refactoring and fixing project structure (#612)

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* Added .editorconfig and fixed style according to it (#621)

* added .editorconfig and fixed style according to it

* add issue link to TODO for creator executor

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* PolicyExtractor refactoring & testing (#625)

* Initial extractorExecutor parameters\configuration refactoring + tests setup

* codestyle fixes. created apiclients and separated API + extraction for policy extractor

* review updates

* explicit variable for fixing dotnet build error CS0815

* fix IO.DirectoryNotFoundException in tests

* rename `ToParameterize` properties

* move template creator to Common\Templates\Abstractions

* rename templateCreator to templateGeneratorBase and make it a parent for all creators\extractors

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* add DI to application (#631)

* add DI to application

* cleared entry pointed, deleted reflection, get rid of comman-line library dependencies in business logic code

* review +build fix

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* product-apis extractor refactoring (#636)

* product apis refactoring

* launchsettings.json rollback

* rename service api products extractor

* global renaming, fix PR review

* rename product-apis response and properties

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* order resources section fields of generated templates (#637)

* order resources section fields of generated templates

* fix comment

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* refactor product extractor, fix logging, rework api-clients (#639)

* refactor product extractor, fix logging, rework api-clients

* rename predefined parameter

* parameter order fix

* rollback launch settings. json

* ignore changes in launch settings json

* make template builder as an injectable service

* exclude template builder extensions

* removed explicit discard

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* fix typos in paths (#640)

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* implement groups extractor (#641)

* implement groups extractor

* [review] duplicated code removal, cleaning tests, fixing namings

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* ApiVersionSet, AuthorizationServer extractors refactoring (#643)

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* make templates generic & refactor api-extractor (#644)

* make templates generic + refactor api-extractor

* runtime bugs fixes

* PR review

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* serialization fixes after refactoring + entry point descriptions added (#645)

* serialization fixes

* provide fully-described outputs and fulfill rdocumentation

* fix required options for commands

* fix spaces

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>

* fix refactoring breaking changes (checked manually)

* remove public pipelines

Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants