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

Getting class name in path of Swagger output #536

Open
alienatorZ opened this issue Apr 27, 2018 · 2 comments · May be fixed by #549
Open

Getting class name in path of Swagger output #536

alienatorZ opened this issue Apr 27, 2018 · 2 comments · May be fixed by #549

Comments

@alienatorZ
Copy link

Im getting a class name in the path definition for Swagger.

Here is my output
...
"paths": {
"/@javax.ws.rs.Path(value=/objSvc)/hello/json": {
"get": {
"operationId": "get1",
"produces": [
...

here is the definition:
@path("/objSvc")
public class NewService {

@GET
@Path("/hello/json")
@Produces("application/json")
public MyObj get1() {
    // TODO: Implementation for HTTP GET request
    System.out.println("GET invoked");
    MyObj m = new MyObj();
    m.setId("sdfsadf");
    m.setNum1(1);
    return m;
}

@GET
@Path("/hello/xml")
@Produces("application/xml")
public MyObj get2() {
    // TODO: Implementation for HTTP GET request
    System.out.println("GET invoked");
    MyObj m = new MyObj();
    m.setId("sdfsadf");
    m.setNum1(1);
    return m;
}

}

Any ideas why I would be seeing this as opposed to

/objSvc/hello/json ??

Thanks,
AlienatorZ

@inem88
Copy link

inem88 commented Jul 3, 2018

Do you solve this problem??

inem88 added a commit to inem88/msf4j that referenced this issue Oct 9, 2018
Fix wso2#536. See right work with javax.ws.rs.Path in line 690.
@inem88 inem88 linked a pull request Oct 9, 2018 that will close this issue
@inem88
Copy link

inem88 commented Oct 9, 2018

I found that it was work correct in version 2.2.2.
So you can use

	<dependency>
		<groupId>org.wso2.msf4j</groupId>
		<artifactId>msf4j-swagger</artifactId>
		<version>2.2.2</version>
	</dependency>

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

Successfully merging a pull request may close this issue.

2 participants