Skip to content

Commit

Permalink
Issue #6830: Java server - Add getter to ApiException templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Xendar committed Aug 7, 2020
1 parent 57ee092 commit 5a184e4
Show file tree
Hide file tree
Showing 13 changed files with 312 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package {{apiPackage}};

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
{{>generatedAnnotation}}
public class ApiException extends Exception{
public class ApiException extends Exception {
/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {
/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package {{apiPackage}};

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
{{>generatedAnnotation}}
public class ApiException extends Exception{
public class ApiException extends Exception {
/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {
/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package {{apiPackage}};

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
{{>generatedAnnotation}}
public class ApiException extends Exception{
public class ApiException extends Exception {
/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {
/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package {{apiPackage}};

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
{{>generatedAnnotation}}
public class ApiException extends Exception{
public class ApiException extends Exception {
/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {
/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
package org.openapitools.api;

/**
* The exception that can be used to store the HTTP status code returned by an API response.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")
public class ApiException extends Exception{
public class ApiException extends Exception {

/** The HTTP status code. */
private int code;
public ApiException (int code, String msg) {

/**
* Constructor.
*
* @param code The HTTP status code.
* @param msg The error message.
*/
public ApiException(int code, String msg) {
super(msg);
this.code = code;
}

/**
* Get the HTTP status code.
*
* @return The HTTP status code.
*/
public int getCode() {
return code;
}

}
Loading

0 comments on commit 5a184e4

Please sign in to comment.