title: Pass a hardcoded value through mongoose schema
body: <p>I would like to post some hard coded values along with user input(variables) every time.<br>
  <code>args: [{ type: mongoose.Schema.Types.Mixed, required: true }]</code> >>in this array i would like to pass some hard coded values along with user input variables. </p>
  
  <p>Well my data to be posted looks like this.</p>
  
  <p><code>{"file": "**&lt;user input&gt;**","name":"&lt;user input&gt;", "className": "com.izac.Parser.IO", "args": ["-i", "{\"enrichedKafkaOptions\": {\"checkpointLocation\": \"**&lt;hard coded path always remains the same&gt;**", \"kafka.bootstrap.servers\": \"localhost:9092\", \"topic\": \"demoEnriched\"}, \"rejectedKafkaOptions\": {\"checkpointLocation\": \"/Users/vipulrajan/Desktop/checkpoints/DemoRejected\", \"kafka.bootstrap.servers\": \"localhost:9092\", \"topic\": \"demoRejected\"} }","-s", "{\"master\":\"local[*]\", \"appName\":\"app1\", \"config\":{\"jvm.memory\":\"4g\"} }"]};</code></p>
  
  <p>This is my schema,</p>
  
  <pre><code>const mongoose = require('mongoose');
  
  
  const livy_schema = mongoose.Schema({
      file: { type: String, required: true },
      name: { type: String, required: true },
      className: { type: String, required: true },
      args: [{ type: mongoose.Schema.Types.Mixed, required: true }] //here i have constants to pass on to 
  });
  
  const kafka_schema = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      name: { type: String, required: true, unique: false },
      config: { type: mongoose.Schema.Types.Mixed, required: true } //here i have constants to pass on to 
  });
  
  
  const enrichedEventSchema = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      projectId: { type: mongoose.Schema.Types.ObjectId, ref: 'Project', required: true },
      name: { type: String, required: true, unique: true },
      description: { type: String, required: false },
      type: { type: String, enum: ["Enriched"], required: true },
      format: { type: String, enum: ["JSON", "DELIMITED", "FixedWidth", "LOG"], required: true },
      kafka: [kafka_schema],
      livy: [livy_schema]  
  });
  </code></pre>
  
  <p>Original question <a href="https://stackoverflow.com/questions/51836461/asynchronous-programming-in-node-js-to-pass-constants-predefined-mandatory-value">Asynchronous Programming in node js to pass constants/predefined mandatory values through mongoose model</a> .</p>
  
  <p>I'm kind of in dilemma, like should i pass this hardcodeded values in router.post() method(if its possible, how should i code?) or in schema? please guide me in right direction.</p>