forked from loafle/openapi-generator-original
[Microprofile] Add option to use tags a client keys and server generator (#16673)
* [Java/Microprofile] Add support for Jackson serialization & async interfaces using Mutiny in Java Microprofile library
* Regenerate samples & docs
* Add server generator
* Update client to set configKey by classname
* Remove debug remains and comments
* Adapt method override to upstream changes
* Regenerate samples
* Revert "Regenerate samples"
This reverts commit b5bcbdea90.
* Move additional 2xx response to dedicated OpenAPI document
Some other generators than those for Micronaut don't seem to be able to
handle this case, so we don't add it to the general pet store document.
* Make filename consistent with other files in the folder
* Regenerate Microprofile client and server samples
* Generate samples
* Update documentation
* Generate samples
* Remove left-over `*.orig` files from Git merges
* Regenerate samples
* Regenerated samples
* changed generator name to "java-microprofile"
* added the new folder to .github/workflows/samples-java-server-jdk8.yaml so that CI will test it moving forward
* Renamed JavaMicroprofileServerCodegen.java
* regenerated samples
* only enable configKeyFromClassName if configKey is not set
* Updated documentation
* Change samples to use junit 4
* Fix junit 4 test classes
* run ensure up-to-date script
* fix kotlin test errors
---------
Co-authored-by: pravussum <pravussum@users.noreply.github.com>
Co-authored-by: frank <frank.buechel@kiwigrid.com>
Co-authored-by: Oscar <oscar.obrien@kiwigrid.com>
Co-authored-by: oscarobr <133783370+oscarobr@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.HealthCheckResult
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**nullableMessage** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The HealthCheckResult model module.
|
||||
* @module model/HealthCheckResult
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class HealthCheckResult {
|
||||
/**
|
||||
* Constructs a new <code>HealthCheckResult</code>.
|
||||
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
* @alias module:model/HealthCheckResult
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
HealthCheckResult.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>HealthCheckResult</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/HealthCheckResult} obj Optional instance to populate.
|
||||
* @return {module:model/HealthCheckResult} The populated <code>HealthCheckResult</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new HealthCheckResult();
|
||||
|
||||
if (data.hasOwnProperty('NullableMessage')) {
|
||||
obj['NullableMessage'] = ApiClient.convertToType(data['NullableMessage'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>HealthCheckResult</code>.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>HealthCheckResult</code>.
|
||||
*/
|
||||
static validateJSON(data) {
|
||||
// ensure the json data is a string
|
||||
if (data['NullableMessage'] && !(typeof data['NullableMessage'] === 'string' || data['NullableMessage'] instanceof String)) {
|
||||
throw new Error("Expected the field `NullableMessage` to be a primitive type in the JSON string but got " + data['NullableMessage']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} NullableMessage
|
||||
*/
|
||||
HealthCheckResult.prototype['NullableMessage'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default HealthCheckResult;
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.HealthCheckResult();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('HealthCheckResult', function() {
|
||||
it('should create an instance of HealthCheckResult', function() {
|
||||
// uncomment below and update the code to test HealthCheckResult
|
||||
//var instance = new OpenApiPetstore.HealthCheckResult();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.HealthCheckResult);
|
||||
});
|
||||
|
||||
it('should have the property nullableMessage (base name: "NullableMessage")', function() {
|
||||
// uncomment below and update the code to test the property nullableMessage
|
||||
//var instance = new OpenApiPetstore.HealthCheckResult();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
Reference in New Issue
Block a user