Refactor create_spec for post model