generator-jhipster-micronaut icon indicating copy to clipboard operation
generator-jhipster-micronaut copied to clipboard

Add AdminUserDTO and the PublicUserResource

Open gzsombor opened this issue 4 years ago • 5 comments

To separate the publicly accessible user information from the private one. Porting https://github.com/jhipster/generator-jhipster/issues/12374

gzsombor avatar Dec 22 '20 23:12 gzsombor

Thanks @gzsombor ! It looks like the gradle-jwt-react sample end to end UI tests need to be checked with these updates.

JasonTypesCodes avatar Dec 30 '20 23:12 JasonTypesCodes

I think the problem is that this blueprint still use the old - 6.x templates - for the frontend generation. I tried to migrate this blueprint to the latest generator, but I didn't have success.

gzsombor avatar Jan 01 '21 00:01 gzsombor

Looks good to me. Thanks @gzsombor for contributing this. @JasonTypesCodes We should now decide when to do the last/final release based on 6.x as this feature is already part of 7.x if I am not mistaken (and we will not backport it).

I picked up the 1.0 conversation in its issue (#189)

JasonTypesCodes avatar Jan 04 '21 16:01 JasonTypesCodes

@gzsombor This project has been updated to use JHipster 7 in https://github.com/jhipster/generator-jhipster-micronaut/pull/265. Does that make it so you can fix and commit this?

mraible avatar Aug 08 '22 18:08 mraible

Sure, I will try to rebase my patch

gzsombor avatar Aug 09 '22 07:08 gzsombor

@gzsombor Can you please resolve conflicts or close?

mraible avatar Aug 16 '23 05:08 mraible

I've rebased the code, but I can't test it locally, using 'mhipster' or calling 'jhipster --blueprints micronaut' or 'npx jhipster --blueprints micronaut' ends up with this error:

CommonJS modules can always be imported via the default export, for example using:

import pkg from '../../../jdl/jhipster/reserved-keywords.js';
const { isReservedTableName } = pkg;

file:///mnt/butterfs/projects/jhipster/generator-jhipster/dist/generators/server/support/prepare-entity.mjs:21
import { isReservedTableName } from '../../../jdl/jhipster/reserved-keywords.js';
         ^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'isReservedTableName' not found. The requested module '../../../jdl/jhipster/reserved-keywords.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '../../../jdl/jhipster/reserved-keywords.js';
const { isReservedTableName } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

The developer setup is not documented at all, and I can't google it, how to solve. Any recommendation which works with the current JHipster generator?

gzsombor avatar Aug 16 '23 21:08 gzsombor

@gzsombor I just merged the upgrade to JHipster 7.9.3, so you might try rebasing again. I created an app last night with the following command after running npm link:

mhipster jdl ~/dev/generator-jhipster-micronaut/test-integration/samples/gradle-oauth-angular.jdl \
  --skip-jhipster-dependencies --force

mraible avatar Aug 17 '23 02:08 mraible

Thanks, it turned out, if I don't want to use the development jhipster-generator, it works properly :)

I've rebased, and fixed a couple of smaller issues around the DTO naming, I'm hopeful, that the tests will be green

gzsombor avatar Aug 17 '23 17:08 gzsombor

@gzsombor It looks like you need to run npm run update-snapshot.

mraible avatar Aug 17 '23 20:08 mraible

thanks, I've rebased the change, and fixed the silly search&replace typo bug... This will work now :)

gzsombor avatar Aug 17 '23 21:08 gzsombor

And everything is green now, we can merge it :)

gzsombor avatar Aug 17 '23 21:08 gzsombor