diff --git a/aep/general/0133/aep.md.j2 b/aep/general/0133/aep.md.j2 index e60eaa2b..59a5ce59 100644 --- a/aep/general/0133/aep.md.j2 +++ b/aep/general/0133/aep.md.j2 @@ -64,7 +64,7 @@ rpc CreateBook(CreateBookRequest) returns (Book) { {% tab oas %} -{% sample '../oas.yaml', '/publishers/{publisher_id}/books:' %} +{% sample '../oas.yaml', '$.paths./publishers/{publisher}/books.post' %} {% endtabs %} @@ -110,9 +110,9 @@ message CreateBookRequest { {% tab oas %} -- The request body **must** be the resource being created. +{% sample '../oas.yaml', '$.paths./publishers/{publisher}/books.post.requestBody' %} -{% sample '../oas.yaml', 'book:' %} +- The request body **must** be the resource being created. {% endtabs %} @@ -164,7 +164,9 @@ publishers/012345678-abcd-cdef/books/12341234-5678-abcd {% tab oas %} -- The `id` is a query parameter on the request URI. +{% sample '../oas.yaml', '$.paths./publishers/{publisher}/books.post.requestBody' %} + +- The `id` field **must** be a query parameter on the request. {% endtabs %} diff --git a/aep/general/oas.yaml b/aep/general/oas.yaml index 39d5db83..0ba95a95 100644 --- a/aep/general/oas.yaml +++ b/aep/general/oas.yaml @@ -24,14 +24,14 @@ components: published: type: boolean required: - - price - - published + - price + - published type: object x-aep-resource: parents: - - publisher + - publisher patterns: - - /publishers/{publisher}/books/{book} + - /publishers/{publisher}/books/{book} plural: books singular: book book-edition: @@ -46,13 +46,13 @@ components: readOnly: true type: string required: - - displayname + - displayname type: object x-aep-resource: parents: - - book + - book patterns: - - /publishers/{publisher}/books/{book}/editions/{book-edition} + - /publishers/{publisher}/books/{book}/editions/{book-edition} plural: book-editions singular: book-edition isbn: @@ -67,7 +67,7 @@ components: type: object x-aep-resource: patterns: - - /isbns/{isbn} + - /isbns/{isbn} plural: isbns singular: isbn publisher: @@ -86,7 +86,7 @@ components: type: object x-aep-resource: patterns: - - /publishers/{publisher} + - /publishers/{publisher} plural: publishers singular: publisher info: @@ -97,11 +97,10 @@ paths: /isbns: post: parameters: - - in: query - name: id - required: true - schema: {} - type: string + - in: query + name: id + required: true + type: string requestBody: content: application/json: @@ -109,7 +108,7 @@ paths: $ref: '#/components/schemas/isbn' required: true responses: - '200': + "200": content: application/json: schema: @@ -118,13 +117,12 @@ paths: /isbns/{isbn}: get: parameters: - - in: path - name: isbn - required: true - schema: {} - type: string + - in: path + name: isbn + required: true + type: string responses: - '200': + "200": content: application/json: schema: @@ -133,18 +131,16 @@ paths: /publishers: get: parameters: - - in: query - name: max_page_size - required: true - schema: {} - type: integer - - in: query - name: page_token - required: true - schema: {} - type: string + - in: query + name: max_page_size + required: true + type: integer + - in: query + name: page_token + required: true + type: string responses: - '200': + "200": content: application/json: schema: @@ -157,11 +153,10 @@ paths: description: Successful response post: parameters: - - in: query - name: id - required: true - schema: {} - type: string + - in: query + name: id + required: true + type: string requestBody: content: application/json: @@ -169,7 +164,7 @@ paths: $ref: '#/components/schemas/publisher' required: true responses: - '200': + "200": content: application/json: schema: @@ -178,24 +173,22 @@ paths: /publishers/{publisher}: delete: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string responses: - '200': + "200": content: null - description: '' + description: "" get: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string responses: - '200': + "200": content: application/json: schema: @@ -203,11 +196,10 @@ paths: description: Successful response patch: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string requestBody: content: application/json: @@ -215,7 +207,7 @@ paths: $ref: '#/components/schemas/publisher' required: true responses: - '200': + "200": content: application/json: schema: @@ -223,11 +215,10 @@ paths: description: Successful response put: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string requestBody: content: application/json: @@ -235,7 +226,7 @@ paths: $ref: '#/components/schemas/publisher' required: true responses: - '200': + "200": content: application/json: schema: @@ -244,23 +235,20 @@ paths: /publishers/{publisher}/books: get: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: query - name: max_page_size - required: true - schema: {} - type: integer - - in: query - name: page_token - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: query + name: max_page_size + required: true + type: integer + - in: query + name: page_token + required: true + type: string responses: - '200': + "200": content: application/json: schema: @@ -277,16 +265,14 @@ paths: description: Successful response post: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: query - name: id - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: query + name: id + required: true + type: string requestBody: content: application/json: @@ -294,7 +280,7 @@ paths: $ref: '#/components/schemas/book' required: true responses: - '200': + "200": content: application/json: schema: @@ -303,34 +289,30 @@ paths: /publishers/{publisher}/books/{book}: delete: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: path + name: book + required: true + type: string responses: - '200': + "200": content: null - description: '' + description: "" get: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: path + name: book + required: true + type: string responses: - '200': + "200": content: application/json: schema: @@ -338,41 +320,14 @@ paths: description: Successful response patch: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/book' + - in: path + name: publisher required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/book' - description: Successful response - put: - parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string + type: string + - in: path + name: book + required: true + type: string requestBody: content: application/json: @@ -380,7 +335,7 @@ paths: $ref: '#/components/schemas/book' required: true responses: - '200': + "200": content: application/json: schema: @@ -389,28 +344,24 @@ paths: /publishers/{publisher}/books/{book}/editions: get: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string - - in: query - name: max_page_size - required: true - schema: {} - type: integer - - in: query - name: page_token - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: path + name: book + required: true + type: string + - in: query + name: max_page_size + required: true + type: integer + - in: query + name: page_token + required: true + type: string responses: - '200': + "200": content: application/json: schema: @@ -423,21 +374,18 @@ paths: description: Successful response post: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string - - in: query - name: id - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: path + name: book + required: true + type: string + - in: query + name: id + required: true + type: string requestBody: content: application/json: @@ -445,7 +393,7 @@ paths: $ref: '#/components/schemas/book-edition' required: true responses: - '200': + "200": content: application/json: schema: @@ -454,48 +402,42 @@ paths: /publishers/{publisher}/books/{book}/editions/{book-edition}: delete: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string - - in: path - name: book-edition - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: path + name: book + required: true + type: string + - in: path + name: book-edition + required: true + type: string responses: - '200': + "200": content: null - description: '' + description: "" get: parameters: - - in: path - name: publisher - required: true - schema: {} - type: string - - in: path - name: book - required: true - schema: {} - type: string - - in: path - name: book-edition - required: true - schema: {} - type: string + - in: path + name: publisher + required: true + type: string + - in: path + name: book + required: true + type: string + - in: path + name: book-edition + required: true + type: string responses: - '200': + "200": content: application/json: schema: $ref: '#/components/schemas/book-edition' description: Successful response servers: - - url: http://localhost:8081 +- url: http://localhost:8081