How to use the body.intValue function in body

To help you get started, we’ve selected a few body examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lukeautry / tsoa / tests / integration / dynamic-controllers-express-server.spec.ts View on Github external
(err, res) => {
          const body = JSON.parse(err.text);

          expect(body.fields['body.floatValue'].message).to.equal('Invalid float error message.');
          expect(body.fields['body.floatValue'].value).to.equal(bodyModel.floatValue);
          expect(body.fields['body.doubleValue'].message).to.equal('Invalid double error message.');
          expect(body.fields['body.doubleValue'].value).to.equal(bodyModel.doubleValue);
          expect(body.fields['body.intValue'].message).to.equal('invalid integer number');
          expect(body.fields['body.intValue'].value).to.equal(bodyModel.intValue);
          expect(body.fields['body.longValue'].message).to.equal('Custom Required long number.');
          expect(body.fields['body.longValue'].value).to.equal(bodyModel.longValue);
          expect(body.fields['body.booleanValue'].message).to.equal('invalid boolean value');
          expect(body.fields['body.booleanValue'].value).to.equal(bodyModel.booleanValue);

          expect(body.fields['body.dateValue'].message).to.equal('invalid ISO 8601 date format, i.e. YYYY-MM-DD');
          expect(body.fields['body.dateValue'].value).to.equal(bodyModel.dateValue);
          expect(body.fields['body.datetimeValue'].message).to.equal('invalid ISO 8601 datetime format, i.e. YYYY-MM-DDTHH:mm:ss');
          expect(body.fields['body.datetimeValue'].value).to.equal(bodyModel.datetimeValue);

          expect(body.fields['body.numberMax10'].message).to.equal('max 10');
          expect(body.fields['body.numberMax10'].value).to.equal(bodyModel.numberMax10);
          expect(body.fields['body.numberMin5'].message).to.equal('min 5');
          expect(body.fields['body.numberMin5'].value).to.equal(bodyModel.numberMin5);
          expect(body.fields['body.stringMax10Lenght'].message).to.equal('maxLength 10');
          expect(body.fields['body.stringMax10Lenght'].value).to.equal(bodyModel.stringMax10Lenght);
github lukeautry / tsoa / tests / integration / openapi3-express.spec.ts View on Github external
(err, res) => {
        const body = JSON.parse(err.text);

        expect(body.fields['body.floatValue'].message).to.equal('Invalid float error message.');
        expect(body.fields['body.floatValue'].value).to.equal(bodyModel.floatValue);
        expect(body.fields['body.doubleValue'].message).to.equal('Invalid double error message.');
        expect(body.fields['body.doubleValue'].value).to.equal(bodyModel.doubleValue);
        expect(body.fields['body.intValue'].message).to.equal('invalid integer number');
        expect(body.fields['body.intValue'].value).to.equal(bodyModel.intValue);
        expect(body.fields['body.longValue'].message).to.equal('Custom Required long number.');
        expect(body.fields['body.longValue'].value).to.equal(bodyModel.longValue);
        expect(body.fields['body.booleanValue'].message).to.equal('invalid boolean value');
        expect(body.fields['body.booleanValue'].value).to.equal(bodyModel.booleanValue);

        expect(body.fields['body.dateValue'].message).to.equal('invalid ISO 8601 date format, i.e. YYYY-MM-DD');
        expect(body.fields['body.dateValue'].value).to.equal(bodyModel.dateValue);
        expect(body.fields['body.datetimeValue'].message).to.equal('invalid ISO 8601 datetime format, i.e. YYYY-MM-DDTHH:mm:ss');
        expect(body.fields['body.datetimeValue'].value).to.equal(bodyModel.datetimeValue);

        expect(body.fields['body.numberMax10'].message).to.equal('max 10');
        expect(body.fields['body.numberMax10'].value).to.equal(bodyModel.numberMax10);
        expect(body.fields['body.numberMin5'].message).to.equal('min 5');
        expect(body.fields['body.numberMin5'].value).to.equal(bodyModel.numberMin5);
        expect(body.fields['body.stringMax10Lenght'].message).to.equal('maxLength 10');
        expect(body.fields['body.stringMax10Lenght'].value).to.equal(bodyModel.stringMax10Lenght);
github lukeautry / tsoa / tests / integration / dynamic-controllers-express-server.spec.ts View on Github external
(err, res) => {
          const body = JSON.parse(err.text);

          expect(body.fields['body.floatValue'].message).to.equal('Invalid float error message.');
          expect(body.fields['body.floatValue'].value).to.equal(bodyModel.floatValue);
          expect(body.fields['body.doubleValue'].message).to.equal('Invalid double error message.');
          expect(body.fields['body.doubleValue'].value).to.equal(bodyModel.doubleValue);
          expect(body.fields['body.intValue'].message).to.equal('invalid integer number');
          expect(body.fields['body.intValue'].value).to.equal(bodyModel.intValue);
          expect(body.fields['body.longValue'].message).to.equal('Custom Required long number.');
          expect(body.fields['body.longValue'].value).to.equal(bodyModel.longValue);
          expect(body.fields['body.booleanValue'].message).to.equal('invalid boolean value');
          expect(body.fields['body.booleanValue'].value).to.equal(bodyModel.booleanValue);

          expect(body.fields['body.dateValue'].message).to.equal('invalid ISO 8601 date format, i.e. YYYY-MM-DD');
          expect(body.fields['body.dateValue'].value).to.equal(bodyModel.dateValue);
          expect(body.fields['body.datetimeValue'].message).to.equal('invalid ISO 8601 datetime format, i.e. YYYY-MM-DDTHH:mm:ss');
          expect(body.fields['body.datetimeValue'].value).to.equal(bodyModel.datetimeValue);

          expect(body.fields['body.numberMax10'].message).to.equal('max 10');
          expect(body.fields['body.numberMax10'].value).to.equal(bodyModel.numberMax10);
          expect(body.fields['body.numberMin5'].message).to.equal('min 5');
          expect(body.fields['body.numberMin5'].value).to.equal(bodyModel.numberMin5);
          expect(body.fields['body.stringMax10Lenght'].message).to.equal('maxLength 10');
github lukeautry / tsoa / tests / integration / openapi3-express.spec.ts View on Github external
(err, res) => {
        const body = JSON.parse(err.text);

        expect(body.fields['body.floatValue'].message).to.equal('Invalid float error message.');
        expect(body.fields['body.floatValue'].value).to.equal(bodyModel.floatValue);
        expect(body.fields['body.doubleValue'].message).to.equal('Invalid double error message.');
        expect(body.fields['body.doubleValue'].value).to.equal(bodyModel.doubleValue);
        expect(body.fields['body.intValue'].message).to.equal('invalid integer number');
        expect(body.fields['body.intValue'].value).to.equal(bodyModel.intValue);
        expect(body.fields['body.longValue'].message).to.equal('Custom Required long number.');
        expect(body.fields['body.longValue'].value).to.equal(bodyModel.longValue);
        expect(body.fields['body.booleanValue'].message).to.equal('invalid boolean value');
        expect(body.fields['body.booleanValue'].value).to.equal(bodyModel.booleanValue);

        expect(body.fields['body.dateValue'].message).to.equal('invalid ISO 8601 date format, i.e. YYYY-MM-DD');
        expect(body.fields['body.dateValue'].value).to.equal(bodyModel.dateValue);
        expect(body.fields['body.datetimeValue'].message).to.equal('invalid ISO 8601 datetime format, i.e. YYYY-MM-DDTHH:mm:ss');
        expect(body.fields['body.datetimeValue'].value).to.equal(bodyModel.datetimeValue);

        expect(body.fields['body.numberMax10'].message).to.equal('max 10');
        expect(body.fields['body.numberMax10'].value).to.equal(bodyModel.numberMax10);
        expect(body.fields['body.numberMin5'].message).to.equal('min 5');
        expect(body.fields['body.numberMin5'].value).to.equal(bodyModel.numberMin5);
        expect(body.fields['body.stringMax10Lenght'].message).to.equal('maxLength 10');