Try the Commands Troubleshooting and Help page if you get stuff with server errors.
Villager Shop Generator
Using the summon command to spawn in a minecraft a villager to create custom trades and custom villager shops. Options include set profession, biome type, level and trades that villager can make.
Villager Trouble shooting
Check, Item ID is just the item, count is 1 or greater. Item NBT tags are complex try simpler tags if you have problems.
Villager Spawn eggs
Unfortunately the villager spawn egg is bugged when it comes to setting profession and trades. See mojang bugs here Villager spawn eggs not working properly
How to summon a baby villager (villager child)
Like most passive mobs in Minecraft, you can summon a villager child by setting the Age tag to a negative number (under the "Additional" tab).
/summon minecraft:villager ~ ~ ~ {Age:-1200} (Grows up in 60 seconds)/summon minecraft:villager ~ ~ ~ {Age:-6000} (Grows up in 5 minutes)
Villager trades
Building trade data is complicated and takes some time. Each trade needs at least one buy item and one sell item. You can add nbt tag data for named and enchanted items (other tags may work too). Summon generally creates a villager in a blank state, so it's best to set all the options that you would like. Remember long commands need to into command block to get around the chat limit.
In this example you can buy a iron sword from the villager
/summon minecraft:villager ~ ~ ~ {VillagerData:{type:plains,profession:farmer,level:2},Offers:{Recipes:[{buy:{id:emerald,Count:1},sell:{id:iron_sword,Count:1}}]}}
In this example you can buy a named iron sword from the villager
/summon minecraft:villager ~ ~ ~ {VillagerData:{type:plains,profession:farmer,level:2},Offers:{Recipes:[{buy:{id:emerald,Count:1},sell:{id:iron_sword,Count:1,tag:{display:{Name:"[{\"text\":\"Pointy\",\"italic\":false}]"}}}}]}}
In this example you can buy an enchanted named iron sword from the a villager
/summon minecraft:villager ~ ~ ~ {VillagerData:{type:plains,profession:farmer,level:2},Offers:{Recipes:[{buy:{id:emerald,Count:1},sell:{id:iron_sword,Count:1,tag:{display:{Name:"[{\"text\":\"Pointy\",\"italic\":false}]"},Enchantments:[{id:sharpness,lvl:3}]}}}]}}
What about Wandering Traders, and Zombie Villagers
Try the mob generator for wandering trader, which details options for that mob.
Try the mob generator for zombie villager, which details options for that mob.
Suggestions or found a bug
Leave me a comment/like on:Minecraft Versions Permalinks
If you're looking for a particular summon mob generator you can link to these specific versions of the command generator.
Detailed Mob Generators
Generators with pattern selectors
Other Mobs NBT Tag Data
Summon mob page with notes about custom mob options.