Skip to content

Commit

Permalink
feat(openapi): updating OperationIds (#56)
Browse files Browse the repository at this point in the history
Updating OperationIDs to match the future specification
in the AEPs.
  • Loading branch information
toumorokoshi authored Dec 11, 2024
1 parent 0c34806 commit b765f21
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 37 deletions.
36 changes: 18 additions & 18 deletions example/bookstore/v1/bookstore_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"post": {
"summary": "",
"description": "Create method for isbn",
"operationId": "isbn.create",
"operationId": "CreateIsbn",
"parameters": [],
"responses": {
"200": {
Expand Down Expand Up @@ -121,7 +121,7 @@
"get": {
"summary": "",
"description": "List method for publisher",
"operationId": "publisher.list",
"operationId": "ListPublisher",
"parameters": [
{
"name": "max_page_size",
Expand Down Expand Up @@ -166,7 +166,7 @@
"post": {
"summary": "",
"description": "Create method for publisher",
"operationId": "publisher.create",
"operationId": "CreatePublisher",
"parameters": [],
"responses": {
"200": {
Expand Down Expand Up @@ -197,7 +197,7 @@
"get": {
"summary": "",
"description": "Get method for publisher",
"operationId": "publisher.get",
"operationId": "GetPublisher",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -225,7 +225,7 @@
"patch": {
"summary": "",
"description": "Update method for publisher",
"operationId": "publisher.update",
"operationId": "UpdatePublisher",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -264,7 +264,7 @@
"put": {
"summary": "",
"description": "Apply method for publisher",
"operationId": "publisher.apply",
"operationId": "ApplyPublisher",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -303,7 +303,7 @@
"delete": {
"summary": "",
"description": "Delete method for publisher",
"operationId": "publisher.delete",
"operationId": "DeletePublisher",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -340,7 +340,7 @@
"get": {
"summary": "",
"description": "List method for book",
"operationId": "book.list",
"operationId": "ListBook",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -400,7 +400,7 @@
"post": {
"summary": "",
"description": "Create method for book",
"operationId": "book.create",
"operationId": "CreateBook",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -441,7 +441,7 @@
"get": {
"summary": "",
"description": "Get method for book",
"operationId": "book.get",
"operationId": "GetBook",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -478,7 +478,7 @@
"patch": {
"summary": "",
"description": "Update method for book",
"operationId": "book.update",
"operationId": "UpdateBook",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -526,7 +526,7 @@
"put": {
"summary": "",
"description": "Apply method for book",
"operationId": "book.apply",
"operationId": "ApplyBook",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -574,7 +574,7 @@
"delete": {
"summary": "",
"description": "Delete method for book",
"operationId": "book.delete",
"operationId": "DeleteBook",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -620,7 +620,7 @@
"get": {
"summary": "",
"description": "List method for book-edition",
"operationId": "book-edition.list",
"operationId": "ListBookEdition",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -683,7 +683,7 @@
"post": {
"summary": "",
"description": "Create method for book-edition",
"operationId": "book-edition.create",
"operationId": "CreateBookEdition",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -733,7 +733,7 @@
"get": {
"summary": "",
"description": "Get method for book-edition",
"operationId": "book-edition.get",
"operationId": "GetBookEdition",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -779,7 +779,7 @@
"delete": {
"summary": "",
"description": "Delete method for book-edition",
"operationId": "book-edition.delete",
"operationId": "DeleteBookEdition",
"parameters": [
{
"name": "publisher",
Expand Down Expand Up @@ -825,7 +825,7 @@
"post": {
"summary": "",
"description": "Custom method archive for book",
"operationId": "book:archive",
"operationId": ":ArchiveBook",
"parameters": [
{
"name": "publisher",
Expand Down
36 changes: 18 additions & 18 deletions example/bookstore/v1/bookstore_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ paths:
summary: ""
post:
description: Create method for isbn
operationId: isbn.create
operationId: CreateIsbn
parameters: []
requestBody:
content:
Expand Down Expand Up @@ -174,7 +174,7 @@ paths:
/publishers:
get:
description: List method for publisher
operationId: publisher.list
operationId: ListPublisher
parameters:
- description: ""
in: query
Expand Down Expand Up @@ -203,7 +203,7 @@ paths:
summary: ""
post:
description: Create method for publisher
operationId: publisher.create
operationId: CreatePublisher
parameters: []
requestBody:
content:
Expand All @@ -223,7 +223,7 @@ paths:
/publishers/{publisher}:
delete:
description: Delete method for publisher
operationId: publisher.delete
operationId: DeletePublisher
parameters:
- description: ""
in: path
Expand All @@ -246,7 +246,7 @@ paths:
summary: ""
get:
description: Get method for publisher
operationId: publisher.get
operationId: GetPublisher
parameters:
- description: ""
in: path
Expand All @@ -264,7 +264,7 @@ paths:
summary: ""
patch:
description: Update method for publisher
operationId: publisher.update
operationId: UpdatePublisher
parameters:
- description: ""
in: path
Expand All @@ -289,7 +289,7 @@ paths:
summary: ""
put:
description: Apply method for publisher
operationId: publisher.apply
operationId: ApplyPublisher
parameters:
- description: ""
in: path
Expand All @@ -315,7 +315,7 @@ paths:
/publishers/{publisher}/books:
get:
description: List method for book
operationId: book.list
operationId: ListBook
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -354,7 +354,7 @@ paths:
summary: ""
post:
description: Create method for book
operationId: book.create
operationId: CreateBook
parameters:
- description: ""
in: path
Expand All @@ -380,7 +380,7 @@ paths:
/publishers/{publisher}/books/{book}:
delete:
description: Delete method for book
operationId: book.delete
operationId: DeleteBook
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -409,7 +409,7 @@ paths:
summary: ""
get:
description: Get method for book
operationId: book.get
operationId: GetBook
parameters:
- description: ""
in: path
Expand All @@ -433,7 +433,7 @@ paths:
summary: ""
patch:
description: Update method for book
operationId: book.update
operationId: UpdateBook
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -464,7 +464,7 @@ paths:
summary: ""
put:
description: Apply method for book
operationId: book.apply
operationId: ApplyBook
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -496,7 +496,7 @@ paths:
/publishers/{publisher}/books/{book}/editions:
get:
description: List method for book-edition
operationId: book-edition.list
operationId: ListBookEdition
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -537,7 +537,7 @@ paths:
summary: ""
post:
description: Create method for book-edition
operationId: book-edition.create
operationId: CreateBookEdition
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -569,7 +569,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
Expand Down Expand Up @@ -598,7 +598,7 @@ paths:
summary: ""
get:
description: Get method for book-edition
operationId: book-edition.get
operationId: GetBookEdition
parameters:
- description: ""
in: path
Expand Down Expand Up @@ -629,7 +629,7 @@ paths:
/publishers/{publisher}/books/{book}:archive:
post:
description: Custom method archive for book
operationId: book:archive
operationId: :ArchiveBook
parameters:
- description: ""
in: path
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit b765f21

Please sign in to comment.