Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganization for config files [Not Ready For Merge] #1215

Closed
wants to merge 43 commits into from

Conversation

fearthecowboy
Copy link
Member

@fearthecowboy fearthecowboy commented May 10, 2017

This is the reorganized layout for the specs repository.

Testing with this should being ASAP;

@fearthecowboy
Copy link
Member Author

I'm testing out generating the Azure Resource Schemas from this. More minor changes yet coming, I'm sure.

@lmazuel
Copy link
Member

lmazuel commented May 10, 2017

@fearthecowboy I have questions if you don't mind:

  • If I use "specification/resources/resource-manager/readme.md", I will generate one client only. Currently, resources has one client for each file (one for links, one for features, etc.). IOW, they are not using Composite right now, and with this readme.md using "api-version=XXXXXX" will not be compatible. Thoughts? Have you discussed that with the team already?
  • Is the namespace folder strict? If it's Microsoft.Compute, should I consider this a bug if I found another namespace inside?

Otherwise, looks good to me

@fearthecowboy
Copy link
Member Author

Hey @lmazuel

Ideally, you (meaning Python, or any other 'enlightened' generator) woulnd't use the per-RP readme.md files.

I've added a 'batch' mode to autorest (although I think we're going to refactor it a bit more yet), that can process a very large list of swagger files sequentially, and I think it'll be a lot more to your liking. (I'm using it for AzureResourceSchema generation).

In the not too distant future, I think we're going to remove entirely the notion of 'composite' (or merged swagger docs) in favor of individual processing, and allow generators to 'merge' the generation artifacts however they wish (in the case of c#, that's where we'd generate a per-RP client 'sdk' )

The folder structure is intended to be pretty strict (a given RP can have stuff in any namespace, but the resources in a namespace should be only that namespace)

@lmazuel
Copy link
Member

lmazuel commented May 10, 2017

To be sure I understand, the "batch" more:

  • Currently if I do --input-file=A ---input-file=B, it creates one unique client right? So for me it's "composite like" (two inputs => one output).
  • The batch mode will allow me to do --input-file=A ---input-file=B and get two clients?

@fearthecowboy
Copy link
Member Author

@lmazuel -- Yes.

Question: Is there ever a case where you want a merged client?

(for an 'work-in-progress' example see https://github.com/Azure/azure-rest-api-specs/blob/702e7033580b6b6b0ab4749f6b8f2f497b997d62/profiles/ResourceSchemas.md )

@lmazuel
Copy link
Member

lmazuel commented May 10, 2017

@fearthecowboy All network in one client, compute+disk in one client (for instance).

@fearthecowboy
Copy link
Member Author

@lmazuel ok, I'm in the office tomorrow -- we should get together sometime in the morning if you're free. I need to make sure we know exactly how you're doing things 🍖

Copy link
Contributor

@veronicagg veronicagg left a comment

Choose a reason for hiding this comment

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

Readme at the root of the repo needs update.
There seem to be 2 folders "Microsoft.Advisor" and "microsoft.advisor" in arm-advisor.

@@ -0,0 +1,87 @@
# Compute
Copy link
Contributor

Choose a reason for hiding this comment

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

should the folder for the new specs be named "resource-manager" or "resource-management"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a definitive reason one way or the other?

I have no strong feelings one way or the other.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not really, I've seen us use management before, but I just searched around in the Azure docs online and they seem to refer to it as Azure Resource Manager, so let's go with manager. Thanks!

@veronicagg
Copy link
Contributor

are all composite files going away with this change, I noticed https://github.com/Azure/azure-rest-api-specs/blob/reorg/specification/insights/compositeInsightsManagementClient.json ?

@@ -28,7 +28,18 @@ These are the global settings for the Batch API.
# common
title: Batch
description: Batch Client
api-version: 2017-01-01.4.0
api-version: 2017-05-01.5.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Ohh nooo what are these ^M characters?

Copy link
Member Author

Choose a reason for hiding this comment

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

Windows and it's desperate attempt to get all CRLF when LF will do?

Lemme see if I can eliminate them.

@dsgouda
Copy link
Contributor

dsgouda commented Jun 6, 2017

@olydis, please ensure that all .md files under arm-* directories have the openapi-type flag set to arm, while others are set to default, we may have to make another pass to figure out the data plane ones, but this is the bare minimum.

@Azure Azure deleted a comment from azuresdkci Jun 9, 2017
@olydis
Copy link
Contributor

olydis commented Jun 9, 2017

@dsgouda went for data-plane for the data plane ones... since this is gonna roll out in July there should be opportunity to fix the categorization.

@dsgouda
Copy link
Contributor

dsgouda commented Jun 13, 2017

@veronicagg as @olydis mentioned we are starting off with actually marking all specs not under arm* directories of the repo as data-plane specs which would mean we would be running DataPlane specific validation rules over these.
Just want to confirm if you're onboard with this plan.

@veronicagg
Copy link
Contributor

@dsgouda I think that's reasonable, we can tune it based on feedback, it's going to anyway be a subset of what we have today, so should be better.

@dsgouda
Copy link
Contributor

dsgouda commented Jun 19, 2017

The CI build script for linter needs to be updated to exclude all jsons under *examples* directories
@vishrutshah are you looking into it?

@vishrutshah
Copy link
Contributor

@dsgouda Wouldn't this 3900abb#diff-32008d041c23a0732242a32942c339e4R115 cover that or do we need the changes somewhere else?

@salameer
Copy link
Member

salameer commented Jul 7, 2017

Folks I see changes requested on this PR and I believe we're going to switch the new structure on Monday, so what that plan for this PR?

@salameer
Copy link
Member

salameer commented Jul 7, 2017

@olydis, I think you had an action item on the VMSS swagger and where it's going to show up for Networking right?

lmazuel and others added 5 commits July 7, 2017 14:11
* Update MD Compute for Python

* Group python together

* Group Python again

* Update Web Readme for Python

* Update SQL MD for Python

* Update Monitor Mgmt MD for Python

* Update Monitor Data MD for Python

* Update GraphRBAC MD for Python

* Partial update of Network MD for Python

* Update full Network for Python

* Remove creation of Python from MD
* Fix selection of swagger

* Fixing `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants