Comments (3)
Are you sure itβs { "rank": { "type": "string" } }
and not { "rank": "string" }
? If so, post your actual OpenAPI schema and we can debug further (also be sure to run it through a validator like Redoy)
from openapi-typescript.
Here is the schema.yaml:
'Ranking':
{
'properties':
{
'results': { 'items': { '$ref': '#/components/schemas/RankingResults' }, 'type': 'array', 'title': 'Results' },
'totalResults': { 'type': 'integer', 'title': 'Totalresults' },
'totalPages': { 'type': 'integer', 'title': 'Totalpages' },
'currentResults': { 'type': 'integer', 'title': 'Currentresults' },
'currentPage': { 'type': 'integer', 'title': 'Currentpage' },
},
'additionalProperties': false,
'type': 'object',
'required': ['totalResults', 'totalPages', 'currentResults', 'currentPage'],
'title': 'Ranking',
},
'RankingResults':
{
'properties':
{
'rank': { 'title': 'Rank' },
'name': { 'title': 'Name' },
},
'additionalProperties': false,
'type': 'object',
'title': 'RankingResults',
},
I will try Redoy, thanks ππ»
Edit: So there are a few validation errors, but they are only related to the security-defined rule or the operation-4xx-response rule.
from openapi-typescript.
Damn, I think I copied the example value instead of the schema:
RankingCollapse all object
resultsCollapse all array<object>
ItemsCollapse all object
rank any
name any
If the source is any, no wonder that I am getting unknown... π
I'll close this for now, thanks ππ»
from openapi-typescript.
Related Issues (20)
- Cannot find name 'HeadersInit'. HOT 6
- Headers lost in fetch request when using BUN HOT 2
- Problem after using ver 7 with generated types for mapping of discriminator HOT 5
- CLI option to validate existing file HOT 5
- bug: request body fields with default values are treated as required HOT 4
- Bug: references to nested properties in schemas generate invalid types
- Error saving output on windows with full file paths instead of relative
- Setup section in npm and the docs are not similar HOT 3
- Types are not enforced with typescript `5.5.3` HOT 8
- Generates invalid types when API paths are nested HOT 3
- Inject option dropped in v7 HOT 1
- Document for conditional authentication failed. HOT 2
- transform function changing objects to not-nullable no longer working in v7 HOT 3
- openapi-fetch: example for extending api client methods HOT 2
- Undefined properties on body object are not flagged if required fields are filled in HOT 8
- Support cookie parameters HOT 3
- Default values override "required" state in output types HOT 2
- params always required HOT 2
- Consider using codegen instead of generics HOT 13
- Problem using --array-length when minItems equals to maxItems HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-typescript.