We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Cannot generate result type of pagination with a generic result type.
To Reproduce Spec:
`openapi: 3.0.1 info: title: API description: API version: v1 contact: name: Company license: name: MIT servers:
The text was updated successfully, but these errors were encountered:
Fixed, see doc: https://github.com/atc-net/atc-rest-api-generator?tab=readme-ov-file#list-of-items-with-a-custom-paginationresult https://github.com/atc-net/atc-rest-api-generator?tab=readme-ov-file#list-of-items-with-a-built-in-pagination
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Cannot generate result type of pagination with a generic result type.
To Reproduce
Spec:
`openapi: 3.0.1
info:
title: API
description: API
version: v1
contact:
name: Company
license:
name: MIT
servers:
description: Api version 1.0
tags:
description: ''
paths:
/products:
parameters:
in: header
required: false
schema:
type: string
format: uuid
get:
summary: Retrieve all products
description: Retrieve all products
operationId: listProducts
parameters:
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Pagination"
- type: object
properties:
results:
type: array
items:
$ref: "#/components/schemas/Product"
components:
parameters:
continuationToken:
name: continuationToken
in: query
required: false
schema:
type: string
nullable: true
description: The continuation token.
opcUaUrl:
name: opcUaUrl
in: query
required: true
schema:
type: string
pagingPageSize:
name: pageSize
in: query
required: true
schema:
type: integer
minimum: 1
maximum: 100
default: 10
description: The numbers of items to return.
pagingPageIndex:
name: pageIndex
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
description: The number of items to skip before starting to collect the result set.
password:
name: password
in: query
required: false
schema:
type: string
userName:
name: userName
in: query
required: false
schema:
type: string
schemas:
Pagination:
type: object
title: Pagination
description: An item result subset of a data query.
properties:
pageSize:
type: number
description: The number of items to request.
pageIndex:
type: number
nullable: true
description: The given page index starting with 0.
queryString:
type: string
nullable: true
description: The query to filter items by.
continuationToken:
type: string
nullable: true
description: Token to indicate next result set.
count:
type: number
description: Items count in result set.
totalCount:
type: number
nullable: true
description: Total items count.
totalPages:
type: number
nullable: true
description: Total pages.
results:
type: array
items: {}
required:
Product:
title: Product
type: object
required:
properties:
id:
type: string
format: uuid
entityId:
type: string
version:
type: integer
format: int64
requestBodies: {}
responses: {}
`
The text was updated successfully, but these errors were encountered: