Open dpalic opened 11 months ago
found more issues:
"has_theme_file": {
"description": "Theme file exists.",
"type": "bool",
"context": [
"embed",
"view",
"edit"
],
"readonly": true
},
it is how it looks like from woocommerce generated
/wc/v1/customers/{id}
or
"manage_stock": {
"type": [
"null",
"object",
"string",
"number",
"boolean",
"integer",
"array"
],
"description": "Stock management at variation level."
},
which is getting converted into Mixed
but the class is missing after generating
Thanks @dpalic. I can look into 3.0 compatibility, but it will be tricky. As far as I know, WordPress supports/uses the latest JSON schema spec, which is only supported by OpenAPI 3.1.0.
the generated openapi definition is writing bool as a type, afaik bool is undefined in the spec and shall be named boolean
I'll look into it 👍
if it helps I can share you a code generator via PN to identify the issues better
if it helps I can share you a code generator via PN to identify the issues better
That would be great!
Hi, sorry for delay, plz check this https://www.dropbox.com/scl/fi/jqiv0pj0v3csrme8dzvij/java-wordpress-reduced.tar.gz?rlkey=q2jfc9jidug3fp4noyqqtkdom&dl=0
this tutorial may help (if new to java and maven): https://jhipster.xenovation.com/install-sdkman-howto/
and afterwards
sdk list java
sdk install maven 3.8.5
and now
mvn clean package
@dpalic Thanks for the file! I'll try to reproduce the issue soon.
Sorry for the delay.
So I think we have two problems.
I can fix problem 1, but I think problem 2 is out of scope for this project. We can introduce a layer that attempts to convert the latest JSONSchema (which is supported by the latest WordPress) specification to OpenAPI 3.0, but I'm not sure how well it would work.
I'll work on a fix for #1 for now.
wanted to try #1 but i am missing an release
in the meanwhile (a year ago, swagger integrated support for 3.1.0) so the generator shall do the same. So would have liked to try it Do you have a new release to try?
as of checking #31 this project is built on openapi 3.1.0 the swagger generator is as of now and for unclear time not compatible to that version. It would be great to have a compatibility mode of this wp-openapi to generate 3.0.0 openapi spec, so that many languages are out of the box supported by swagger/openapi generator
do you see any chance to support openapi 3.0.0 e.g. on a branch?