From 824cc753bf4f0186165a1e42e5d03cdddbb23345 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Tue, 10 Dec 2024 21:58:28 -0800 Subject: [PATCH] feat(openapi): updating OperationIds Updating OperationIDs to match the future specification in the AEPs. --- example/bookstore/v1/bookstore_openapi.json | 36 ++++++++++----------- example/bookstore/v1/bookstore_openapi.yaml | 36 ++++++++++----------- go.mod | 2 +- go.sum | 4 +++ 4 files changed, 41 insertions(+), 37 deletions(-) diff --git a/example/bookstore/v1/bookstore_openapi.json b/example/bookstore/v1/bookstore_openapi.json index 7ac3351..702d76e 100644 --- a/example/bookstore/v1/bookstore_openapi.json +++ b/example/bookstore/v1/bookstore_openapi.json @@ -15,7 +15,7 @@ "post": { "summary": "", "description": "Create method for isbn", - "operationId": "isbn.create", + "operationId": "CreateIsbn", "parameters": [], "responses": { "200": { @@ -46,7 +46,7 @@ "get": { "summary": "", "description": "List method for publisher", - "operationId": "publisher.list", + "operationId": "ListPublisher", "parameters": [ { "name": "max_page_size", @@ -91,7 +91,7 @@ "post": { "summary": "", "description": "Create method for publisher", - "operationId": "publisher.create", + "operationId": "CreatePublisher", "parameters": [], "responses": { "200": { @@ -122,7 +122,7 @@ "get": { "summary": "", "description": "Get method for publisher", - "operationId": "publisher.get", + "operationId": "GetPublisher", "parameters": [ { "name": "publisher", @@ -150,7 +150,7 @@ "patch": { "summary": "", "description": "Update method for publisher", - "operationId": "publisher.update", + "operationId": "UpdatePublisher", "parameters": [ { "name": "publisher", @@ -189,7 +189,7 @@ "put": { "summary": "", "description": "Apply method for publisher", - "operationId": "publisher.apply", + "operationId": "ApplyPublisher", "parameters": [ { "name": "publisher", @@ -228,7 +228,7 @@ "delete": { "summary": "", "description": "Delete method for publisher", - "operationId": "publisher.delete", + "operationId": "DeletePublisher", "parameters": [ { "name": "publisher", @@ -265,7 +265,7 @@ "get": { "summary": "", "description": "List method for book", - "operationId": "book.list", + "operationId": "ListBook", "parameters": [ { "name": "publisher", @@ -325,7 +325,7 @@ "post": { "summary": "", "description": "Create method for book", - "operationId": "book.create", + "operationId": "CreateBook", "parameters": [ { "name": "publisher", @@ -366,7 +366,7 @@ "get": { "summary": "", "description": "Get method for book", - "operationId": "book.get", + "operationId": "GetBook", "parameters": [ { "name": "publisher", @@ -403,7 +403,7 @@ "patch": { "summary": "", "description": "Update method for book", - "operationId": "book.update", + "operationId": "UpdateBook", "parameters": [ { "name": "publisher", @@ -451,7 +451,7 @@ "put": { "summary": "", "description": "Apply method for book", - "operationId": "book.apply", + "operationId": "ApplyBook", "parameters": [ { "name": "publisher", @@ -499,7 +499,7 @@ "delete": { "summary": "", "description": "Delete method for book", - "operationId": "book.delete", + "operationId": "DeleteBook", "parameters": [ { "name": "publisher", @@ -545,7 +545,7 @@ "get": { "summary": "", "description": "List method for book-edition", - "operationId": "book-edition.list", + "operationId": "ListBookEdition", "parameters": [ { "name": "publisher", @@ -608,7 +608,7 @@ "post": { "summary": "", "description": "Create method for book-edition", - "operationId": "book-edition.create", + "operationId": "CreateBookEdition", "parameters": [ { "name": "publisher", @@ -658,7 +658,7 @@ "get": { "summary": "", "description": "Get method for book-edition", - "operationId": "book-edition.get", + "operationId": "GetBookEdition", "parameters": [ { "name": "publisher", @@ -704,7 +704,7 @@ "delete": { "summary": "", "description": "Delete method for book-edition", - "operationId": "book-edition.delete", + "operationId": "DeleteBookEdition", "parameters": [ { "name": "publisher", @@ -750,7 +750,7 @@ "post": { "summary": "", "description": "Custom method archive for book", - "operationId": "book:archive", + "operationId": ":ArchiveBook", "parameters": [ { "name": "publisher", diff --git a/example/bookstore/v1/bookstore_openapi.yaml b/example/bookstore/v1/bookstore_openapi.yaml index 8e489df..c77cf96 100644 --- a/example/bookstore/v1/bookstore_openapi.yaml +++ b/example/bookstore/v1/bookstore_openapi.yaml @@ -106,7 +106,7 @@ paths: /isbns: post: description: Create method for isbn - operationId: isbn.create + operationId: CreateIsbn parameters: [] requestBody: content: @@ -126,7 +126,7 @@ paths: /publishers: get: description: List method for publisher - operationId: publisher.list + operationId: ListPublisher parameters: - description: "" in: query @@ -155,7 +155,7 @@ paths: summary: "" post: description: Create method for publisher - operationId: publisher.create + operationId: CreatePublisher parameters: [] requestBody: content: @@ -175,7 +175,7 @@ paths: /publishers/{publisher}: delete: description: Delete method for publisher - operationId: publisher.delete + operationId: DeletePublisher parameters: - description: "" in: path @@ -198,7 +198,7 @@ paths: summary: "" get: description: Get method for publisher - operationId: publisher.get + operationId: GetPublisher parameters: - description: "" in: path @@ -216,7 +216,7 @@ paths: summary: "" patch: description: Update method for publisher - operationId: publisher.update + operationId: UpdatePublisher parameters: - description: "" in: path @@ -241,7 +241,7 @@ paths: summary: "" put: description: Apply method for publisher - operationId: publisher.apply + operationId: ApplyPublisher parameters: - description: "" in: path @@ -267,7 +267,7 @@ paths: /publishers/{publisher}/books: get: description: List method for book - operationId: book.list + operationId: ListBook parameters: - description: "" in: path @@ -306,7 +306,7 @@ paths: summary: "" post: description: Create method for book - operationId: book.create + operationId: CreateBook parameters: - description: "" in: path @@ -332,7 +332,7 @@ paths: /publishers/{publisher}/books/{book}: delete: description: Delete method for book - operationId: book.delete + operationId: DeleteBook parameters: - description: "" in: path @@ -361,7 +361,7 @@ paths: summary: "" get: description: Get method for book - operationId: book.get + operationId: GetBook parameters: - description: "" in: path @@ -385,7 +385,7 @@ paths: summary: "" patch: description: Update method for book - operationId: book.update + operationId: UpdateBook parameters: - description: "" in: path @@ -416,7 +416,7 @@ paths: summary: "" put: description: Apply method for book - operationId: book.apply + operationId: ApplyBook parameters: - description: "" in: path @@ -448,7 +448,7 @@ paths: /publishers/{publisher}/books/{book}/editions: get: description: List method for book-edition - operationId: book-edition.list + operationId: ListBookEdition parameters: - description: "" in: path @@ -489,7 +489,7 @@ paths: summary: "" post: description: Create method for book-edition - operationId: book-edition.create + operationId: CreateBookEdition parameters: - description: "" in: path @@ -521,7 +521,7 @@ paths: /publishers/{publisher}/books/{book}/editions/{book-edition}: delete: description: Delete method for book-edition - operationId: book-edition.delete + operationId: DeleteBookEdition parameters: - description: "" in: path @@ -550,7 +550,7 @@ paths: summary: "" get: description: Get method for book-edition - operationId: book-edition.get + operationId: GetBookEdition parameters: - description: "" in: path @@ -581,7 +581,7 @@ paths: /publishers/{publisher}/books/{book}:archive: post: description: Custom method archive for book - operationId: book:archive + operationId: :ArchiveBook parameters: - description: "" in: path diff --git a/go.mod b/go.mod index 38a9821..2ec24d8 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect github.com/PuerkitoBio/purell v1.1.0 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect - github.com/aep-dev/aep-lib-go v0.0.0-20241205062045-39517ccc141d // indirect + github.com/aep-dev/aep-lib-go v0.0.0-20241211060914-8915f43c3994 // indirect github.com/aep-dev/terraform-provider-aep v0.0.0-20241112052633-f48d45460768 // indirect github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect diff --git a/go.sum b/go.sum index 1de19a5..80f675b 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,10 @@ github.com/aep-dev/aep-lib-go v0.0.0-20241205061430-404ce902bcf0 h1:wYRECZA+Ytig github.com/aep-dev/aep-lib-go v0.0.0-20241205061430-404ce902bcf0/go.mod h1:M+h1D6T2uIUPelmaEsJbjR6JhqKsTlPX3lxp25zQQsk= github.com/aep-dev/aep-lib-go v0.0.0-20241205062045-39517ccc141d h1:oM4zhowSgjTjdPG+qlJSv1XHE9ahwwesNsRt/UOy6kg= github.com/aep-dev/aep-lib-go v0.0.0-20241205062045-39517ccc141d/go.mod h1:M+h1D6T2uIUPelmaEsJbjR6JhqKsTlPX3lxp25zQQsk= +github.com/aep-dev/aep-lib-go v0.0.0-20241211055732-b1e7aa2d5930 h1:2mzOSEsJd8KozzPkCzR59jaCf2llrxlwn9t5RV/962I= +github.com/aep-dev/aep-lib-go v0.0.0-20241211055732-b1e7aa2d5930/go.mod h1:M+h1D6T2uIUPelmaEsJbjR6JhqKsTlPX3lxp25zQQsk= +github.com/aep-dev/aep-lib-go v0.0.0-20241211060914-8915f43c3994 h1:pd+YncR5m4U6m3eeF5Z1In7GypIKNreRvvsfGTc/98M= +github.com/aep-dev/aep-lib-go v0.0.0-20241211060914-8915f43c3994/go.mod h1:M+h1D6T2uIUPelmaEsJbjR6JhqKsTlPX3lxp25zQQsk= github.com/aep-dev/terraform-provider-aep v0.0.0-20241112052633-f48d45460768 h1:b5fRfpIIsOsdsT2N1MsBxr0K/fZacCUlWp0uY9/BJzM= github.com/aep-dev/terraform-provider-aep v0.0.0-20241112052633-f48d45460768/go.mod h1:sUuUJSkWTc4GBxp8GEZXCeEI38VMyuM5msPQ9BG0kMA= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=