diff --git a/example/bookstore/v1/bookstore_openapi.json b/example/bookstore/v1/bookstore_openapi.json index 6f5d8f5..e829dc8 100644 --- a/example/bookstore/v1/bookstore_openapi.json +++ b/example/bookstore/v1/bookstore_openapi.json @@ -13,15 +13,12 @@ "paths": { "/isbns": { "get": { - "summary": "", "description": "List method for isbn", "operationId": "ListIsbn", "parameters": [ { "name": "max_page_size", "in": "query", - "description": "", - "required": false, "schema": { "type": "integer" } @@ -29,8 +26,6 @@ { "name": "page_token", "in": "query", - "description": "", - "required": false, "schema": { "type": "string" } @@ -58,10 +53,8 @@ } }, "post": { - "summary": "", "description": "Create method for isbn", "operationId": "CreateIsbn", - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -75,7 +68,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -89,14 +81,12 @@ }, "/isbns/{isbn}": { "get": { - "summary": "", "description": "Get method for isbn", "operationId": "GetIsbn", "parameters": [ { "name": "isbn", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -119,15 +109,12 @@ }, "/publishers": { "get": { - "summary": "", "description": "List method for publisher", "operationId": "ListPublisher", "parameters": [ { "name": "max_page_size", "in": "query", - "description": "", - "required": false, "schema": { "type": "integer" } @@ -135,8 +122,6 @@ { "name": "page_token", "in": "query", - "description": "", - "required": false, "schema": { "type": "string" } @@ -164,10 +149,8 @@ } }, "post": { - "summary": "", "description": "Create method for publisher", "operationId": "CreatePublisher", - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -181,7 +164,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -195,14 +177,12 @@ }, "/publishers/{publisher}": { "get": { - "summary": "", "description": "Get method for publisher", "operationId": "GetPublisher", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -223,14 +203,12 @@ } }, "patch": { - "summary": "", "description": "Update method for publisher", "operationId": "UpdatePublisher", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -250,7 +228,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -262,14 +239,12 @@ } }, "put": { - "summary": "", "description": "Apply method for publisher", "operationId": "ApplyPublisher", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -289,7 +264,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -301,14 +275,12 @@ } }, "delete": { - "summary": "", "description": "Delete method for publisher", "operationId": "DeletePublisher", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -317,8 +289,6 @@ { "name": "force", "in": "query", - "description": "", - "required": false, "schema": { "type": "boolean" } @@ -338,14 +308,12 @@ }, "/publishers/{publisher}/books": { "get": { - "summary": "", "description": "List method for book", "operationId": "ListBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -354,8 +322,6 @@ { "name": "max_page_size", "in": "query", - "description": "", - "required": false, "schema": { "type": "integer" } @@ -363,8 +329,6 @@ { "name": "page_token", "in": "query", - "description": "", - "required": false, "schema": { "type": "string" } @@ -398,14 +362,12 @@ } }, "post": { - "summary": "", "description": "Create method for book", "operationId": "CreateBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -425,7 +387,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -439,14 +400,12 @@ }, "/publishers/{publisher}/books/{book}": { "get": { - "summary": "", "description": "Get method for book", "operationId": "GetBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -455,7 +414,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -476,14 +434,12 @@ } }, "patch": { - "summary": "", "description": "Update method for book", "operationId": "UpdateBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -492,7 +448,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -512,7 +467,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -524,14 +478,12 @@ } }, "put": { - "summary": "", "description": "Apply method for book", "operationId": "ApplyBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -540,7 +492,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -560,7 +511,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -572,14 +522,12 @@ } }, "delete": { - "summary": "", "description": "Delete method for book", "operationId": "DeleteBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -588,7 +536,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -597,8 +544,6 @@ { "name": "force", "in": "query", - "description": "", - "required": false, "schema": { "type": "boolean" } @@ -618,14 +563,12 @@ }, "/publishers/{publisher}/books/{book}/editions": { "get": { - "summary": "", "description": "List method for book-edition", "operationId": "ListBookEdition", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -634,7 +577,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -643,8 +585,6 @@ { "name": "max_page_size", "in": "query", - "description": "", - "required": false, "schema": { "type": "integer" } @@ -652,8 +592,6 @@ { "name": "page_token", "in": "query", - "description": "", - "required": false, "schema": { "type": "string" } @@ -681,14 +619,12 @@ } }, "post": { - "summary": "", "description": "Create method for book-edition", "operationId": "CreateBookEdition", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -697,7 +633,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -717,7 +652,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -731,14 +665,12 @@ }, "/publishers/{publisher}/books/{book}/editions/{book-edition}": { "get": { - "summary": "", "description": "Get method for book-edition", "operationId": "GetBookEdition", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -747,7 +679,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -756,7 +687,6 @@ { "name": "book-edition", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -777,14 +707,12 @@ } }, "delete": { - "summary": "", "description": "Delete method for book-edition", "operationId": "DeleteBookEdition", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -793,7 +721,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -802,7 +729,6 @@ { "name": "book-edition", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -823,14 +749,12 @@ }, "/publishers/{publisher}/books/{book}:archive": { "post": { - "summary": "", "description": "Custom method archive for book", "operationId": ":ArchiveBook", "parameters": [ { "name": "publisher", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -839,7 +763,6 @@ { "name": "book", "in": "path", - "description": "", "required": true, "schema": { "type": "string" @@ -859,7 +782,6 @@ } }, "requestBody": { - "description": "", "content": { "application/json": { "schema": {} diff --git a/example/bookstore/v1/bookstore_openapi.yaml b/example/bookstore/v1/bookstore_openapi.yaml index 9a762fc..0b7d21d 100644 --- a/example/bookstore/v1/bookstore_openapi.yaml +++ b/example/bookstore/v1/bookstore_openapi.yaml @@ -108,16 +108,12 @@ paths: description: List method for isbn operationId: ListIsbn parameters: - - description: "" - in: query + - in: query name: max_page_size - required: false schema: type: integer - - description: "" - in: query + - in: query name: page_token - required: false schema: type: string responses: @@ -132,17 +128,14 @@ paths: type: array type: object description: Successful response - summary: "" post: description: Create method for isbn operationId: CreateIsbn - parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/isbn' - description: "" required: true responses: "200": @@ -151,14 +144,12 @@ paths: schema: $ref: '#/components/schemas/isbn' description: Successful response - summary: "" /isbns/{isbn}: get: description: Get method for isbn operationId: GetIsbn parameters: - - description: "" - in: path + - in: path name: isbn required: true schema: @@ -170,22 +161,17 @@ paths: schema: $ref: '#/components/schemas/isbn' description: Successful response - summary: "" /publishers: get: description: List method for publisher operationId: ListPublisher parameters: - - description: "" - in: query + - in: query name: max_page_size - required: false schema: type: integer - - description: "" - in: query + - in: query name: page_token - required: false schema: type: string responses: @@ -200,17 +186,14 @@ paths: type: array type: object description: Successful response - summary: "" post: description: Create method for publisher operationId: CreatePublisher - parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/publisher' - description: "" required: true responses: "200": @@ -219,22 +202,18 @@ paths: schema: $ref: '#/components/schemas/publisher' description: Successful response - summary: "" /publishers/{publisher}: delete: description: Delete method for publisher operationId: DeletePublisher parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: query + - in: query name: force - required: false schema: type: boolean responses: @@ -243,13 +222,11 @@ paths: application/json: schema: {} description: Successful response - summary: "" get: description: Get method for publisher operationId: GetPublisher parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: @@ -261,13 +238,11 @@ paths: schema: $ref: '#/components/schemas/publisher' description: Successful response - summary: "" patch: description: Update method for publisher operationId: UpdatePublisher parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: @@ -277,7 +252,6 @@ paths: application/json: schema: $ref: '#/components/schemas/publisher' - description: "" required: true responses: "200": @@ -286,13 +260,11 @@ paths: schema: $ref: '#/components/schemas/publisher' description: Successful response - summary: "" put: description: Apply method for publisher operationId: ApplyPublisher parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: @@ -302,7 +274,6 @@ paths: application/json: schema: $ref: '#/components/schemas/publisher' - description: "" required: true responses: "200": @@ -311,28 +282,22 @@ paths: schema: $ref: '#/components/schemas/publisher' description: Successful response - summary: "" /publishers/{publisher}/books: get: description: List method for book operationId: ListBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: query + - in: query name: max_page_size - required: false schema: type: integer - - description: "" - in: query + - in: query name: page_token - required: false schema: type: string responses: @@ -351,13 +316,11 @@ paths: type: array type: object description: Successful response - summary: "" post: description: Create method for book operationId: CreateBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: @@ -367,7 +330,6 @@ paths: application/json: schema: $ref: '#/components/schemas/book' - description: "" required: true responses: "200": @@ -376,28 +338,23 @@ paths: schema: $ref: '#/components/schemas/book' description: Successful response - summary: "" /publishers/{publisher}/books/{book}: delete: description: Delete method for book operationId: DeleteBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: type: string - - description: "" - in: query + - in: query name: force - required: false schema: type: boolean responses: @@ -406,19 +363,16 @@ paths: application/json: schema: {} description: Successful response - summary: "" get: description: Get method for book operationId: GetBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: @@ -430,19 +384,16 @@ paths: schema: $ref: '#/components/schemas/book' description: Successful response - summary: "" patch: description: Update method for book operationId: UpdateBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: @@ -452,7 +403,6 @@ paths: application/json: schema: $ref: '#/components/schemas/book' - description: "" required: true responses: "200": @@ -461,19 +411,16 @@ paths: schema: $ref: '#/components/schemas/book' description: Successful response - summary: "" put: description: Apply method for book operationId: ApplyBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: @@ -483,7 +430,6 @@ paths: application/json: schema: $ref: '#/components/schemas/book' - description: "" required: true responses: "200": @@ -492,34 +438,27 @@ paths: schema: $ref: '#/components/schemas/book' description: Successful response - summary: "" /publishers/{publisher}/books/{book}/editions: get: description: List method for book-edition operationId: ListBookEdition parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: type: string - - description: "" - in: query + - in: query name: max_page_size - required: false schema: type: integer - - description: "" - in: query + - in: query name: page_token - required: false schema: type: string responses: @@ -534,19 +473,16 @@ paths: type: array type: object description: Successful response - summary: "" post: description: Create method for book-edition operationId: CreateBookEdition parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: @@ -556,7 +492,6 @@ paths: application/json: schema: $ref: '#/components/schemas/book-edition' - description: "" required: true responses: "200": @@ -565,26 +500,22 @@ paths: schema: $ref: '#/components/schemas/book-edition' description: Successful response - summary: "" /publishers/{publisher}/books/{book}/editions/{book-edition}: delete: description: Delete method for book-edition operationId: DeleteBookEdition parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: type: string - - description: "" - in: path + - in: path name: book-edition required: true schema: @@ -595,25 +526,21 @@ paths: application/json: schema: {} description: Successful response - summary: "" get: description: Get method for book-edition operationId: GetBookEdition parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: type: string - - description: "" - in: path + - in: path name: book-edition required: true schema: @@ -625,20 +552,17 @@ paths: schema: $ref: '#/components/schemas/book-edition' description: Successful response - summary: "" /publishers/{publisher}/books/{book}:archive: post: description: Custom method archive for book operationId: :ArchiveBook parameters: - - description: "" - in: path + - in: path name: publisher required: true schema: type: string - - description: "" - in: path + - in: path name: book required: true schema: @@ -647,7 +571,6 @@ paths: content: application/json: schema: {} - description: "" required: true responses: "200": @@ -656,6 +579,5 @@ paths: schema: $ref: '#/components/schemas/book' description: Successful response - summary: "" servers: - url: http://localhost:8081 diff --git a/go.mod b/go.mod index 2ec24d8..080f066 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-20241211060914-8915f43c3994 // indirect + github.com/aep-dev/aep-lib-go v0.0.0-20241214201740-a1e57b9a0273 // 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 80f675b..41c784d 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,8 @@ github.com/aep-dev/aep-lib-go v0.0.0-20241211055732-b1e7aa2d5930 h1:2mzOSEsJd8Ko 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/aep-lib-go v0.0.0-20241214201740-a1e57b9a0273 h1:Ti/n7Xko9nrr731O0f7iUewiTL1fiPA93A4/iSazW6M= +github.com/aep-dev/aep-lib-go v0.0.0-20241214201740-a1e57b9a0273/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=