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

refactor: remove summary setting in api register #67

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/apic-extension/azext_apic_extension/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def register_apic(cmd, api_location, resource_group, service_name, environment_i
# Create API and Create API Version
extracted_api_name = _generate_api_id(info.get('title', 'Default-API')).lower()
extracted_api_description = info.get('description', 'API Description')[:1000]
extracted_api_summary = info.get('summary', str(extracted_api_description)[:200])
extracted_api_title = info.get('title', 'API Title')
extracted_api_version = info.get('version', 'v1').replace(".", "-").lower()
extracted_api_version_title = info.get('version', 'v1').replace(".", "-").lower()
Expand Down Expand Up @@ -245,7 +244,6 @@ def register_apic(cmd, api_location, resource_group, service_name, environment_i
'service_name': service_name,
'workspace_name': 'default',
'title': extracted_api_title,
'summary': extracted_api_summary,
'type': extracted_api_kind,
'contacts': contacts,
'license': extracted_api_license,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ interactions:
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)",
"externalDocumentation": [{"description": "Find out more about Swagger", "title":
"Title", "url": "http://swagger.io"}], "kind": "rest", "license": {"name": "Apache
2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html"}, "summary":
"This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You
can find out more about\nSwagger at [http://swagger.io](http://swagger.io).
In the third iteration of the pet store, we''ve", "title": "Swagger Petstore
- OpenAPI 3.0"}}'
2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html"}, "title": "Swagger
Petstore - OpenAPI 3.0"}}'
headers:
Accept:
- application/json
Expand All @@ -26,7 +23,7 @@ interactions:
Connection:
- keep-alive
Content-Length:
- '1265'
- '1049'
Content-Type:
- application/json
ParameterSetName:
Expand All @@ -38,32 +35,30 @@ interactions:
response:
body:
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger
Petstore - OpenAPI 3.0","summary":"This is a sample Pet Store Server based
Petstore - OpenAPI 3.0","description":"This is a sample Pet Store Server based
on the OpenAPI 3.0 specification. You can find out more about\nSwagger at
[http://swagger.io](http://swagger.io). In the third iteration of the pet
store, we''ve","description":"This is a sample Pet Store Server based on the
OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io).
In the third iteration of the pet store, we''ve switched to the design first
approach!\nYou can now help us improve the API whether it''s by making changes
to the definition itself or to the code.\nThat way, with time, we can improve
the API in general, and expose some of the new features in OAS3.\n\nSome useful
links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n-
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","kind":"rest","license":{"name":"Apache
store, we''ve switched to the design first approach!\nYou can now help us
improve the API whether it''s by making changes to the definition itself or
to the code.\nThat way, with time, we can improve the API in general, and
expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet
Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The
source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","kind":"rest","license":{"name":"Apache
2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find
out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-09-25T06:04:22.0797381Z","lastModifiedAt":"2024-09-25T06:04:22.0797363Z"}}'
out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-09-25T07:50:38.5987921Z","lastModifiedAt":"2024-09-25T07:50:38.5987912Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '1648'
- '1434'
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:22 GMT
- Wed, 25 Sep 2024 07:50:38 GMT
etag:
- c100f45f-0000-0100-0000-66f3a7e60000
- c20026b6-0000-0100-0000-66f3c0ce0000
expires:
- '-1'
pragma:
Expand All @@ -79,7 +74,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-msedge-ref:
- 'Ref A: 2965024EA30A4745BB871789D54C7DF6 Ref B: MAA201060516025 Ref C: 2024-09-25T06:04:20Z'
- 'Ref A: 125AB7155BD047018F6A24650F14A5AA Ref B: MAA201060513025 Ref C: 2024-09-25T07:50:36Z'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -108,20 +103,20 @@ interactions:
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19?api-version=2024-03-01
response:
body:
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-09-25T06:04:24.4396055Z","lastModifiedAt":"2024-09-25T06:04:24.4396046Z"}}'
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-09-25T07:50:41.207248Z","lastModifiedAt":"2024-09-25T07:50:41.2072469Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '449'
- '448'
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:24 GMT
- Wed, 25 Sep 2024 07:50:41 GMT
etag:
- 6b0055f8-0000-0100-0000-66f3a7e80000
- 6d00e31c-0000-0100-0000-66f3c0d10000
expires:
- '-1'
pragma:
Expand All @@ -137,7 +132,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-msedge-ref:
- 'Ref A: 7E6D562063454DED9824476BB24A54E5 Ref B: MAA201060513031 Ref C: 2024-09-25T06:04:22Z'
- 'Ref A: 7BBA5D3A780542D1BD9C664C50DFA7C1 Ref B: MAA201060516011 Ref C: 2024-09-25T07:50:39Z'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -182,20 +177,20 @@ interactions:
to the definition itself or to the code.\nThat way, with time, we can improve
the API in general, and expose some of the new features in OAS3.\n\nSome useful
links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n-
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-09-25T06:04:26.972125Z","lastModifiedAt":"2024-09-25T06:04:26.9721241Z"}}'
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-09-25T07:50:43.8052406Z","lastModifiedAt":"2024-09-25T07:50:43.8052398Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '1167'
- '1168'
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:27 GMT
- Wed, 25 Sep 2024 07:50:44 GMT
etag:
- ae02eaed-0000-0100-0000-66f3a7ea0000
- b202af76-0000-0100-0000-66f3c0d30000
expires:
- '-1'
pragma:
Expand All @@ -211,7 +206,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-msedge-ref:
- 'Ref A: BEEAE04383F54BAAA0802416D9D735E9 Ref B: MAA201060513025 Ref C: 2024-09-25T06:04:25Z'
- 'Ref A: 69B9206B121347AFBF7555DCA9F5F8C1 Ref B: MAA201060514037 Ref C: 2024-09-25T07:50:42Z'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -663,7 +658,7 @@ interactions:
content-length:
- '0'
date:
- Wed, 25 Sep 2024 06:04:29 GMT
- Wed, 25 Sep 2024 07:50:46 GMT
expires:
- '-1'
pragma:
Expand All @@ -677,7 +672,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-msedge-ref:
- 'Ref A: 1DCAA0BD7D8D43D3B818085D2DA1399D Ref B: MAA201060513031 Ref C: 2024-09-25T06:04:27Z'
- 'Ref A: 435A0471500B4B68B91AAF6C4EF6430F Ref B: MAA201060514045 Ref C: 2024-09-25T07:50:44Z'
x-powered-by:
- ASP.NET
status:
Expand All @@ -703,32 +698,30 @@ interactions:
response:
body:
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger
Petstore - OpenAPI 3.0","summary":"This is a sample Pet Store Server based
Petstore - OpenAPI 3.0","description":"This is a sample Pet Store Server based
on the OpenAPI 3.0 specification. You can find out more about\nSwagger at
[http://swagger.io](http://swagger.io). In the third iteration of the pet
store, we''ve","description":"This is a sample Pet Store Server based on the
OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io).
In the third iteration of the pet store, we''ve switched to the design first
approach!\nYou can now help us improve the API whether it''s by making changes
to the definition itself or to the code.\nThat way, with time, we can improve
the API in general, and expose some of the new features in OAS3.\n\nSome useful
links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n-
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","kind":"rest","lifecycleStage":"design","license":{"name":"Apache
store, we''ve switched to the design first approach!\nYou can now help us
improve the API whether it''s by making changes to the definition itself or
to the code.\nThat way, with time, we can improve the API in general, and
expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet
Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The
source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","kind":"rest","lifecycleStage":"design","license":{"name":"Apache
2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find
out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-09-25T06:04:22.0797381Z","lastModifiedAt":"2024-09-25T06:04:22.0797363Z"}}'
out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-09-25T07:50:38.5987921Z","lastModifiedAt":"2024-09-25T07:50:38.5987912Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '1674'
- '1460'
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:30 GMT
- Wed, 25 Sep 2024 07:50:48 GMT
etag:
- c1001c60-0000-0100-0000-66f3a7e80000
- c2002fb6-0000-0100-0000-66f3c0d10000
expires:
- '-1'
pragma:
Expand All @@ -742,7 +735,7 @@ interactions:
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: 684C3AD264EC43A59097B752F8EEE5CE Ref B: MAA201060516053 Ref C: 2024-09-25T06:04:30Z'
- 'Ref A: 4035717E08E841519A45B34DA1B996FE Ref B: MAA201060515039 Ref C: 2024-09-25T07:50:47Z'
x-powered-by:
- ASP.NET
status:
Expand All @@ -767,20 +760,20 @@ interactions:
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19?api-version=2024-03-01
response:
body:
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-09-25T06:04:24.4396055Z","lastModifiedAt":"2024-09-25T06:04:24.4396046Z"}}'
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-09-25T07:50:41.207248Z","lastModifiedAt":"2024-09-25T07:50:41.2072469Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '449'
- '448'
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:33 GMT
- Wed, 25 Sep 2024 07:50:49 GMT
etag:
- 6b0055f8-0000-0100-0000-66f3a7e80000
- 6d00e31c-0000-0100-0000-66f3c0d10000
expires:
- '-1'
pragma:
Expand All @@ -794,7 +787,7 @@ interactions:
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: 9C2454CBE5BB4A9184705FC94D47463E Ref B: MAA201060513009 Ref C: 2024-09-25T06:04:32Z'
- 'Ref A: D66EBBFC02094321B0891814CDFDEBD8 Ref B: MAA201060515009 Ref C: 2024-09-25T07:50:48Z'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -827,20 +820,20 @@ interactions:
to the definition itself or to the code.\nThat way, with time, we can improve
the API in general, and expose some of the new features in OAS3.\n\nSome useful
links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n-
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","specification":{"name":"openapi","version":"3-0-2"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-09-25T06:04:26.972125Z","lastModifiedAt":"2024-09-25T06:04:32.9647929Z"}}'
[The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","specification":{"name":"openapi","version":"3-0-2"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-09-25T07:50:43.8052406Z","lastModifiedAt":"2024-09-25T07:50:46.2870812Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '1220'
- '1221'
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:34 GMT
- Wed, 25 Sep 2024 07:50:50 GMT
etag:
- ae0217ee-0000-0100-0000-66f3a7f00000
- b202c176-0000-0100-0000-66f3c0d60000
expires:
- '-1'
pragma:
Expand All @@ -854,7 +847,7 @@ interactions:
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: E6CF4817A666442C925576FA7AC224F3 Ref B: MAA201060516021 Ref C: 2024-09-25T06:04:33Z'
- 'Ref A: 108234C8AA174B22BB7E0524B06F8329 Ref B: MAA201060516045 Ref C: 2024-09-25T07:50:50Z'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -1307,7 +1300,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Wed, 25 Sep 2024 06:04:35 GMT
- Wed, 25 Sep 2024 07:50:52 GMT
expires:
- '-1'
pragma:
Expand All @@ -1323,7 +1316,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-msedge-ref:
- 'Ref A: 459FDBC974244C79A512AE52E0C1569D Ref B: MAA201060516033 Ref C: 2024-09-25T06:04:35Z'
- 'Ref A: C5D2D46C2F134608BD64314887EDA315 Ref B: MAA201060516039 Ref C: 2024-09-25T07:50:51Z'
x-powered-by:
- ASP.NET
status:
Expand Down
Loading
Loading