Comments (7)
Same problem for https://github.com/ory/sdk/blob/master/clients/hydra/typescript/model/consentRequest.ts#L27
The issue seems for when we can pass custom objects.
from sdk.
Hm yeah, that's true. The definition comes from here:
https://github.com/ory/hydra/blob/master/consent/types.go#L543
which is translated to:
https://github.com/ory/hydra/blob/master/.schema/api.swagger.json#L2095-L2101
I think type object
is correct but I'm not sure why additionalProperties
is added there and if that's causing the issue?
from sdk.
Could you try and generate the typescript code and take the linked swagger.json and update the additionalProperties part? If that's causing the issue I guess we could open an issue in openapi-generator
from sdk.
There's actually a new version available for openapi-generator so maybe it would be a good idea to bump it as it includes several bugfixes for TypeScript. It would also make sense to tag the version:
https://github.com/ory/sdk/blob/master/Dockerfile#L71
from sdk.
I haven't tested, but it looks like the generated OpenAPI specification should actually be the following according to https://swagger.io/docs/specification/data-models/dictionaries/.
type: object
additionalProperties:
type: string
If that's true, that indicates the problem resides in the tool being used for generating the OpenAPI specification.
from sdk.
Found the upstream: go-swagger/go-swagger#1402
from sdk.
I think this issue came back but for the Go client this time
If in the openapi spec I remove the additionalProperties: true
comment the generator produces the correct type
The sanitizer could remove the additionalProperties field for swagger specs https://github.com/ory/cli/blob/master/cmd/dev/swagger/sanitize.go#L96
spec from pet store
"Pet": {
"description": "A pet for sale in the pet store",
"title": "a Pet",
"type": "object",
"properties": {
"access_token": {
"type": "object",
"x-go-name": "AccessToken"
},
"id_token": {
"type": "object",
"additionalProperties": {
"type": "object"
},
"x-go-name": "IDToken"
}
},
"xml": {
"name": "Pet"
}
},
// Pet A pet for sale in the pet store
type Pet struct {
AccessToken map[string]interface{} `json:"access_token,omitempty"`
IdToken map[string]map[string]interface{} `json:"id_token,omitempty"`
}
Hydra issue related: ory/hydra#3058
from sdk.
Related Issues (20)
- BC breaks: fields in the SDK changed (e.g. FrontendApi > FrontendAPI; IdentityApi > IdentityAPI) HOT 5
- ory client-go 1.6.1: cannot deserialize continue_with response HOT 3
- [Rust] update_registration_flow error handling HOT 1
- Getting error in the response of "createNativeRegistrationFlow" API : Social Sign In and OpenID Connect are only supported for flows initiated using the Browser endpoint
- .NET packages have not been updated HOT 1
- dotnet clients on nuget.com not updated since ~3 months HOT 6
- UnmarshalJSON fails for the LoginFlow type in kratos-client-go
- Elixir deps can't be compiled HOT 1
- v1.11.6 adds axios to @ory/client-fetch HOT 2
- Elixir API client deserialisation error when parsing enum values HOT 2
- Ruby generator generates invalid code due to Cookie Auth in spec HOT 1
- CI fails when trying to publish client HOT 1
- Ory client side libraries should be Tree Shakeable HOT 3
- Publish Java kratos-client 1.2 to maven central HOT 1
- upstream reference closed: github.com/gradle/gradle/issues/25036
- upstream reference closed: github.com/guzzle/psr7/pull/603
- Publish Rust crate v1.2.x
- Keto typescript fetch client HOT 2
- Publish Dart Client with Kratos v1.2.x HOT 1
- Package published to pub.dev is outdated 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 sdk.