-
Notifications
You must be signed in to change notification settings - Fork 2
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
Illegal module access error while running on JDK 17 with Maven #2
Comments
Yes, that is really annoying. Not sure I can do anything about it apart from removing the formatter... (see also: openapi-processor/openapi-processor-core#79) I should probably move that info to the docs. |
... another workaround would be an option to skip the formatting step. It is generated code, so we do not have to read it very often. |
How can I do it? |
disable formatting I'm working on it. It is not possible with the current release. What I found is that you can create a
I checked it with the sample project and it works. just generate models There is no option to generate models only. It is generating only models which are in use, i.e. used by a interface method. Best you can do is to ignore the generated interfaces. |
I'll give it a try |
Hi.
with just ContactRead:
type: object
description: Object providing all the information about a contact in the system without e-mail addresses and phone numbers.
allOf:
- $ref: '#/components/schemas/BasicContactDetails'
required:
- id
properties:
id:
$ref: '#/components/schemas/Id'
image:
$ref: '#/components/schemas/Image' Also, the classes are wrongly generated when composing a model with multiple SingleContactRead:
type: object
description: Object providing all the information about a single contact in the system, including e-mail addresses and phone numbers.
allOf:
- $ref: '#/components/schemas/ContactDetailsWithoutImage'
- $ref: '#/components/schemas/ContactRead'
required:
- id
properties:
id:
$ref: '#/components/schemas/Id'
image:
$ref: '#/components/schemas/Image' I get the following class out: /*
* DO NOT MODIFY - this class was auto generated by openapi-processor-spring
*
* 2021.5
* 2022-02-02T18:39:10.231468100Z
* https://docs.openapiprocessor.io/spring
*/
package com.cdprete.phonebook.dto.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SingleContactRead {
@JsonProperty("name")
private String name;
@JsonProperty("surname")
private String surname;
@JsonProperty("name")
private String name;
@JsonProperty("surname")
private String surname;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
} Maybe I should specify something in the openapi-processor-mapping: v2
options:
package-name: com.cdprete.phonebook.dto That said, the original issue with this ticket is for me solved (or, at least, patched) and therefore I close this ticket. |
oh, I guess you found some missing logic...
I don't have any tests for either case, so it is not implement... yet. Looking at it, thanks for reporting :-) |
... and no you don't need to configure anything in the |
Yes, name and surname are present in both the definitions. |
I have improved the processor. It recognizes the You can check this with version Maven needs this to find the snapshot: <project>
<pluginRepositories>
<pluginRepository>
<id>openapi-processor-snapshots</id>
<name>openapi-processor-snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
<project> |
Hi.
I wanted to test your plugin to see if it fits my needs, but when I try to use it it crashes with the following error:
Plugin configuration in Maven
This is probably caused by https://github.com/google/google-java-format#jdk-16
The text was updated successfully, but these errors were encountered: