Skip to content
New issue

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

How to deal with special characters? #32

Open
TimoGlastra opened this issue Jan 26, 2024 · 2 comments
Open

How to deal with special characters? #32

TimoGlastra opened this issue Jan 26, 2024 · 2 comments

Comments

@TimoGlastra
Copy link
Contributor

The new vc+sd-jwt types in the PEX Models repository seems to be causing some trouble, as OpenAPI Generator strips/replaces special characters thus making the resulting interfaces not aligned with the prpoerties from the specification.

This is the case for vc+sd-jwt -> vcsd_jwt, as well as sd-jwt_alg_values -> sd_jwt_alg_values, and kb-jwt_alg_values -> kb_jwt_alg_values.

I've ran into this problem already years ago (OpenAPITools/openapi-generator#4748), and it seems there's a lot of issues with this (e.g. OpenAPITools/openapi-generator#6810, OpenAPITools/openapi-generator#15261)

What would be the best way forward here? Should we do manual post-processing on the generated interfaces?

I did some tinkering with e.g. https://github.com/drwpow/openapi-typescript which seems to generate the properties correct, but doesn't output separate interfaces etc..

  • I'm submitting a ...
    [x] bug report
@nklomp
Copy link
Contributor

nklomp commented Jan 26, 2024

Yeah we are doing some manual post processing currently.

We can solve this for typescript in some of the templates being used (we are already doing some template work).

Would be nice if you could list the different properties that have issues, then we will update thr documentation and also create a structural automatic approach for typescript.

@TimoGlastra
Copy link
Contributor Author

Okay that sounds great, thanks

The properties I'm currently encountering issues with:

  • vc+sd-jwt (currently encoded as vcsd_jwt)
  • sd-jwt_alg_values (currently encoded as sd_jwt_alg_values
  • kb-jwt_alg_values (currently encoded as kb_jwt_alg_values)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants